-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Move mypy configs from pre-commit to mypy config #5110
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
Conversation
This doesn't seem to work:
Not sure exactly why it doesn't ignore the errors given the configs. I'll close this unless anyone has ideas. |
in order to get this to work you would need to add empty |
Maybe the recommended command should be |
I think this should now work! TIL toml doesn't have quotations for strings We still need the entry in |
@@ -34,6 +34,7 @@ repos: | |||
rev: v0.812 | |||
hooks: | |||
- id: mypy | |||
# Copied from setup.cfg | |||
exclude: "properties|asv_bench" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that setup.cfg
has
[mypy]
exclude = properties|asv_bench|doc
do we still need this exclude
option here? It's my understanding that mypy pre-commit hook should be able to retrieve values defined in setup.cfg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do, unfortunately.
I guess that pre-commit gives it a list of files, and when passed a list of files mypy doesn't honor the exclusions.
could you change the call in the mypy CI to use |
Great done. I didn't know about that. Why do we have that as well as |
|
Thanks! I added a link to that for future travelers |
pre-commit run --all-files
This should mean that running
mypy .
doesn't operate differently from running it in pre-commit.It's also possible I've misunderstood something about mypy configs, please let me know if so!