-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[FYI] mypy_primer #4580
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
Comments
Like this idea, also reminds me of Rust's crater tool. Helps compare the (possibly biased) view of the typeshed collaborators with the practical usage of the types in the ecosystem. |
This is great, thank you! I wonder if we can incorporate it into typeshed CI. |
Yeah, it would be nice to get it into CI in some form. One concern is speed. A Github runner has two cores. It's also worth noting that there'll be a class balance of errors: since most of the projects are well established, I assume most errors will be false positives. I do intend on starting a repository where we can put the things we'd want from #1339. |
Thanks, that is very useful indeed. Maybe at first we could have a daily or weekly run that just informs us when there are problems, but doesn't cause CI to fail. |
I'd recommend using a compiled mypy -- it's often 3-4x faster than interpreted. |
Just measured, it's 3.5x over the corpus. I've made the change to mypy_primer: if you explicitly specify a version, it'll first look for it on PyPI. |
mypy_primer now runs in CI |
With apologies to black_primer, I jotted down a script that lets us run mypy over a large amount of open source Python code. Hopefully this helps democratise the process of identifying regressions and evaluating risky changes.
Something like this was brought up in #4332
This could also serve as a way of decentralising something like #1339
This has informed:
#4579
#4574
#4582
#4583
And you can see it in action at:
python/mypy#9275
More details at: https://github.com/hauntsaninja/mypy_primer
Feel free to close or discuss!
The text was updated successfully, but these errors were encountered: