Skip to content

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

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

xhochy
Copy link
Contributor

@xhochy xhochy commented Jan 8, 2020

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

@xhochy xhochy changed the title More lightweight mypy pre-commit hook BLD: More lightweight mypy pre-commit hook Jan 8, 2020
# 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
Copy link
Member

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

Copy link
Member

@gfyoung gfyoung Jan 8, 2020

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.

Copy link
Contributor Author

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.

@jreback jreback added the Build Library building on various platforms label Jan 9, 2020
gfyoung added a commit that referenced this pull request Jan 10, 2020
Previously, we stated it as merely optional

xref:

#30773
#30814
@gfyoung gfyoung added this to the 1.1 milestone Jan 10, 2020
@gfyoung
Copy link
Member

gfyoung commented Jan 10, 2020

@pandas-dev/pandas-core : Any further thoughts on this? I think we are ready to merge.

@jorisvandenbossche
Copy link
Member

Given that there are no more comments, going to merge this (the 20s of time to commit is getting annoying ..)

@jorisvandenbossche jorisvandenbossche merged commit dd94e0d into pandas-dev:master Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants