Skip to content

Disallow StringMethods for Series and Index when subtype is not str, but allow for Any #1159

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

Open
Dr-Irv opened this issue Mar 11, 2025 · 0 comments
Labels
mypy bug Requires mypy to fix a bug

Comments

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Mar 11, 2025

In #1146 tried to get StringMethods to know that passing Series[float] (for example) is wrong.

I got something to work for Series with pyright . See https://github.com/Dr-Irv/pandas-stubs/tree/pr1146 and this commit: 164bc27

Would like to add this to the stubs.

But as noted here: #1146 (comment) it fails in mypy which seems to be due to python/mypy#15921

@Dr-Irv Dr-Irv added the mypy bug Requires mypy to fix a bug label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mypy bug Requires mypy to fix a bug
Projects
None yet
Development

No branches or pull requests

1 participant