You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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,
Thanks for the reply! I completely understand why you don't want to add it. Any chance there can be alpha/beta/dev releases released once in a while, especially when there's a long time before the next update? I don't know if it's necessary before 1.0, seems like it'll get released soon, but it's something that will help with using mypy with pre-commit.
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: