Skip to content

type args and kwargs as Any in series.pyi #1170

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

Merged
merged 1 commit into from
Mar 13, 2025

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Mar 13, 2025

ref #1168

These are all cases where kwargs / args just exist for compatibility with numpy

Exceptions are:

  • to_numpy, where the kwargs get passed to the extensionarray. Given that third parties can develop their own extensionarrays, I think this one really should be Any, we can't know what arguments third party EA authors will accept?

  • pct_change: this could be more precise, have opened type kwargs in pct_change according to params in shift #1169 about that

  • Closes #xxxx (Replace xxxx with the Github issue number)

  • Tests added: Please use assert_type() to assert the type of any return value

@MarcoGorelli MarcoGorelli marked this pull request as ready for review March 13, 2025 15:36
Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MarcoGorelli

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Mar 13, 2025

@MarcoGorelli before I merge, this will close #1168, but isn't that issue covering more than just core/series.pyi ? If so, I think it should remain open.

@MarcoGorelli
Copy link
Member Author

yup thanks!

@Dr-Irv Dr-Irv merged commit 40f58cf into pandas-dev:main Mar 13, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants