Skip to content
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

CLEAN: Fix overloads for Series.__new__() to be consistent in argument ordering. #717

Closed
Dr-Irv opened this issue May 29, 2023 · 0 comments · Fixed by #722
Closed

CLEAN: Fix overloads for Series.__new__() to be consistent in argument ordering. #717

Dr-Irv opened this issue May 29, 2023 · 0 comments · Fixed by #722

Comments

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented May 29, 2023

See comment 1 at microsoft/pyright#5178 (comment)

The pd.Series.new method has some pretty glaring bugs. Some of the overrides swap the index and dtype parameters. I presume this was done to accommodate the case where the dtype argument is specified by keyword. This can be handled properly by retaining the correct parameter order and adding a keyword-only separator (*). Let me know if you need more details. I definitely recommend addressing this bug because it will lead to incorrect type evaluations.

@twoertwein twoertwein mentioned this issue May 31, 2023
2 tasks
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 a pull request may close this issue.

1 participant