-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add a pre-commit hook #14618
Comments
Thanks for the suggestion, but we won't be doing this. In addition to the wheels issue (which is very important to resolve, compilation makes mypy 4x faster), pre-commit just often is not a great fit for running mypy. It results in enough issues that I wouldn't feel comfortable having an official setup for it. See #13916 |
Hi @hauntsaninja, |
Yeah, mypy's release frequency is a painpoint :-( I think more releases, and more prereleases would be great! See #12210 (comment) (In fairness to the Dropbox folks, who are in charge of new version releases, we were much better about release frequency for parts of 2022. I think the big "1.0" number has put some pressure on this release) It sounds like you're aware of https://github.com/mypyc/mypy_mypyc-wheels ; you can specify URLs in requirements, so maybe there's a way to get pre-commit to use one of those wheels too. |
Feature
Add a pre-commit hook to mypy (see mirrors-mypy/.pre-commit-hooks.yaml).
The only major roadblock is building it using mypyc, but that could use mypy_mypyc-wheels.
Pitch
Currently, to use mypy as a pre-commit hook, you need to use mirrors-mypy. It works fine, the only problem is you're not able to use arbitrary commits or branches (including
master
), just versions released on PyPI. If mypy were to add pre-commit hooks to the repo itself, it would be possible.Also see pre-commit/mirrors-mypy#80
The text was updated successfully, but these errors were encountered: