-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BLD: More lightweight mypy pre-commit hook #30814
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
BLD: More lightweight mypy pre-commit hook #30814
Conversation
# As long as a some files are excluded from check-untyped-defs | ||
# we have to exclude it from the pre-commit hook as the configuration | ||
# is based on modules but the hook runs on files. | ||
- --no-check-untyped-defs |
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.
I would have a slight preference to remove altogether rather than using different defaults that what's in CI
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.
IMO it's better to do a partial mypy
check than none at all as you're making changes.
In our PR checklist, we can then ask that people do a full mypy pandas
check before submitting so that they can catch any other errors.
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.
Given that there has been good progress in getting all untyped defs to pass, I expect this to only be a short-lived workaround.
@pandas-dev/pandas-core : Any further thoughts on this? I think we are ready to merge. |
Given that there are no more comments, going to merge this (the 20s of time to commit is getting annoying ..) |
Fixes #30811
This now will only detect typing problems in the files you have edited. This may still lead to typing problems detected in CI but is hopefully a compromise between speed and early detection of issues before they hit public CI. One line changes in a single file still stay for me in the <1s mark.
cc @gfyoung @jorisvandenbossche