-
Notifications
You must be signed in to change notification settings - Fork 3
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
Precommit: run mypy on all files, including tests. #283
Conversation
Stack from ghstack (oldest at bottom): |
As changes to a file can also lead to type errors in other files, only checking committed files does not help. As #282 fixes all remaining issues in the tests, we can now also check the tests. |
Mypy cannot infer that the nullcontext or pytest.warns condition always results in a context manager. This either needs a type hint or a different logic. --> fixed in #282 |
The only issue now is, that if you have some non-staged files with typing issues in the src directory, not sure if there is an easy way to run on 'staged and already committed files' in precommit.. |
ghstack-source-id: 0f7ce8094f8f592286fe8c0a2193dac831881d50 ghstack-comment-id: 2106237133 Pull Request resolved: #283
Changes to one file can cause mypy failures in non-changed files.
Runs mypy on all files. As changes to one file can cause typing issues in unchanged files.