-
-
Notifications
You must be signed in to change notification settings - Fork 157
Type generic.pyi
#1562
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
base: main
Are you sure you want to change the base?
Type generic.pyi
#1562
Changes from 3 commits
8717b4d
1f0c033
8d7da12
6a1e375
0a6c6f0
6185a87
8b98233
336cad3
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 |
|---|---|---|
|
|
@@ -188,6 +188,7 @@ from pandas._typing import ( | |
| ListLikeU, | ||
| MaskType, | ||
| NaPosition, | ||
| NpDtype, | ||
| NsmallestNlargestKeep, | ||
| NumpyStrDtypeArg, | ||
| ObjectDtypeArg, | ||
|
|
@@ -562,15 +563,9 @@ class Series(IndexOpsMixin[S1], ElementOpsMixin[S1], NDFrame): | |
| def __array_ufunc__( | ||
| self, ufunc: Callable[..., Any], method: _str, *inputs: Any, **kwargs: Any | ||
| ) -> Any: ... | ||
| if sys.version_info >= (3, 11): | ||
| def __array__( | ||
| self, dtype: _str | np.dtype = ..., copy: bool | None = ... | ||
| ) -> np_1darray: ... | ||
| else: | ||
| def __array__( | ||
| self, dtype: _str | np.dtype[Any] = ..., copy: bool | None = ... | ||
| ) -> np_1darray: ... | ||
|
|
||
|
Comment on lines
565
to
573
Contributor
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. Please keep it, it is needed for the pyright strict transition.
Member
Author
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. is it ok to handle this within
Contributor
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.
|
||
| def __array__( | ||
| self, dtype: NpDtype | None = None, copy: bool | None = None | ||
| ) -> np_1darray: ... | ||
| @final | ||
| def __getattr__(self, name: _str) -> S1: ... | ||
|
|
||
|
|
||
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.
Noneia alsoHashable. Also applies to other cases in the changes.