-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: fix mypy warnings/errors #29327
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
What version of mypy are you using and what are the errors exactly? I'm very hesitant to add @angelaambroz fixed the issue with FixedOffset upstream in TypeShed and I think that will make its way into mypy 0.75 |
0.740 |
pandas/core/indexes/frozen.py
Outdated
@@ -68,7 +67,7 @@ def difference(self, other): | |||
return type(self)(temp) | |||
|
|||
# TODO: Consider deprecating these in favor of `union` (xref gh-15506) | |||
__add__ = __iadd__ = union | |||
__add__ = __iadd__ = union # type: ignore |
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.
The error now is essentially because union is unannotated, plus maybe a few more issues with subclass. In any case we should annotate instead of ignoring, especially since there's no rush on this one (current mypy in CI is still only 0.72)
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.
sounds good, ill see if annotating union does the trick
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.
looks like it worked for union, but not for _disabled. removed the "type: ignore"s
Hello @jbrockmendel! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-11-02 02:37:11 UTC |
thanks @jbrockmendel |
When I run
mypy pandas
locally I get a handful of complaints. This fixes about half of them. The other half are aboutFixedOffset
which IIRC we are handling elsewhere.cc @simonjayhawkins