-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
TYP: update mypy and small pyi fixes from ruff #54085
Conversation
@@ -3459,7 +3458,7 @@ def sort_values( | |||
self, | |||
*, | |||
axis: Axis = ..., | |||
ascending: bool | int | Sequence[bool] | Sequence[int] = ..., |
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.
This is undocumented (and incompatible with the declarations in NDFrame) - but it might work at runtime.
@@ -3482,11 +3481,25 @@ def sort_values( | |||
) -> None: | |||
... | |||
|
|||
@overload | |||
def sort_values( |
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.
NDFrame declared this fallback overload, mypy seems to be stricter now and requires it also in the subclasses.
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.
This looks good to me. Will let others approve/merge.
Would still need to decide whether we prefer to disable the ruff/pylint rule or add ignore comments for pyright. Currently, I disabled the rule for ruff but not yet pylint. |
I would slightly prefer enabling the pylint/ruff rules and adding pyright ignores, if there are not too many ignores needed |
Using the pyright comments now |
Thanks @twoertwein |
There is a much newer version of pyright but I haven't yet managed to get it to pass.