-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
- .levels & .codes (FrozenNDArray) | ||
|
||
""" | ||
|
||
import warnings | ||
|
||
import numpy as np | ||
|
@@ -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 commentThe 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 commentThe 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 commentThe 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 |
||
|
||
def __getitem__(self, n): | ||
if isinstance(n, slice): | ||
|
@@ -110,8 +109,8 @@ def __str__(self): | |
def __repr__(self): | ||
return "%s(%s)" % (self.__class__.__name__, str(self)) | ||
|
||
__setitem__ = __setslice__ = __delitem__ = __delslice__ = _disabled | ||
pop = append = extend = remove = sort = insert = _disabled | ||
__setitem__ = __setslice__ = __delitem__ = __delslice__ = _disabled # type: ignore | ||
pop = append = extend = remove = sort = insert = _disabled # type: ignore | ||
|
||
|
||
class FrozenNDArray(PandasObject, np.ndarray): | ||
|
Uh oh!
There was an error while loading. Please reload this page.