-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TYP: Fix typing errors caused by new numpy #48850
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 all 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 |
---|---|---|
|
@@ -65,9 +65,19 @@ | |
|
||
from pandas.io.formats.format import EngFormatter | ||
|
||
ScalarLike_co = Union[ | ||
int, | ||
float, | ||
complex, | ||
str, | ||
bytes, | ||
np.generic, | ||
] | ||
|
||
# numpy compatible types | ||
NumpyValueArrayLike = Union[npt._ScalarLike_co, npt.ArrayLike] | ||
NumpySorter = Optional[npt._ArrayLikeInt_co] | ||
NumpyValueArrayLike = Union[ScalarLike_co, npt.ArrayLike] | ||
# Name "npt._ArrayLikeInt_co" is not defined [name-defined] | ||
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 the same (false positive?) issue as 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. Because the scalar case was trivial while the array cases is defined using multiple private numpy typing objects edit: we definitely should fix this at some point, but this is mainly to get ci running again 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. ok clear - no objections then |
||
NumpySorter = Optional[npt._ArrayLikeInt_co] # type: ignore[name-defined] | ||
|
||
else: | ||
npt: Any = None | ||
|
Uh oh!
There was an error while loading. Please reload this page.