Skip to content

Allow --additional-flags to vary between old & new versions of typechecker #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
davidfstr opened this issue Mar 7, 2025 · 2 comments
Closed

Comments

@davidfstr
Copy link

I'd like to run mypy_primer such that it calls the old version of mypy with a different set of flags than the new version of mypy.

For example, when working on PEP 747 (TypeForm) it would be useful to run the old mypy with --additional-flags="X" and the new mypy with --additional-flags="X --enable-incomplete-feature=TypeForm" so that I can see if enabling my incomplete feature in the new version of mypy causes problems in the projects that mypy_primer knows about. I can't enable my incomplete feature in the old version of mypy because it doesn't know about the feature.

Proposal:

  • Extend mypy_primer's CLI to support options --old-additional-flags="X" and --new-additional-flags="Y" to allow different flags to be passed to the old & new versions of mypy.
  • Maintain in mypy_primer's CLI the option --additional-flags="Z", which is treated as equivalent to --old-additional-flags="Z" --new-additional-flags="Z"
@hauntsaninja
Copy link
Owner

hauntsaninja commented Mar 7, 2025

Looks like you're doing this in mypy CI, in which case maybe the easier solution is to just enable the flag by default. (Either way you'll have to push a change to the PR removing once you're happy with the primer diff)

@davidfstr
Copy link
Author

maybe the easier solution is to just enable the flag by default

Agreed. I'll do that.

@davidfstr davidfstr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants