-
Notifications
You must be signed in to change notification settings - Fork 43
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
Enable mypy in pre-commit #215
Conversation
Initial attempt to add mypy to pre-commit actions. Signed-off-by: Michael Tiemann <[email protected]>
Fix indentation error from copy-paste. Signed-off-by: Michael Tiemann <[email protected]>
Checks are failing because
|
it looks like pandas-stubs version is intended to match the version of pandas https://pypi.org/project/pandas-stubs/#history and pandas-stubs is has a dependency of the same pandas version so I think the versions should match up |
Well that's good. I'll see what I can do to clean up these errors. |
Adjusted various declarations to use public Pandas APIs where possible, ignored things that cannot be fixed without fixing Pandas-Stubs, etc. Might need some more attention for different versions of Pandas/Python, but this work for Pandas 2.1.4 and Python 3.11. Signed-off-by: Michael Tiemann <[email protected]>
Make type hints compatible with python-3.9 (which requires `Union` and does not support the `|` operator to express type disjunction). Signed-off-by: Michael Tiemann <[email protected]>
@andrewgsavage I think that as a first draft, these changes are ready. If/when pandas-stubs moves forward, we can remove a few |
very nice |
Initial attempt to add mypy to pre-commit actions.
pre-commit run --all-files
with no errorsThis changes no user-visible functionality. It enables mypy type checking. If this fails (because pre-commit exceeds certain memory limits, I have a fix for that).