We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
a = pd.Series({0:0, 1:1}) reveal_type(a.keys() print(type(a.keys())
Running pyright on this code gives you
information: Type of "a.keys()" is "list[Unknown]"
Which is normal since it's written explictly here :
pandas-stubs/pandas-stubs/core/series.pyi
Line 655 in 583d198
However, if we run it with python, we get pandas.core.indexes.base.Index
pandas.core.indexes.base.Index
Should we replace the linked line from list to Index ?
list
Index
I have a code that is failing type checking because it call a.keys().tolist(), while it does work as intended.
a.keys().tolist()
The text was updated successfully, but these errors were encountered:
Thanks for the report.
PR with tests welcome.
Sorry, something went wrong.
Update series.pyi, tackling issue pandas-dev#1101
926450b
Imported Index from pandas and Changed keys method: def keys(self) -> Index: ...
No branches or pull requests
Describe the bug
Running pyright on this code gives you
Which is normal since it's written explictly here :
pandas-stubs/pandas-stubs/core/series.pyi
Line 655 in 583d198
However, if we run it with python, we get
pandas.core.indexes.base.Index
Should we replace the linked line from
list
toIndex
?I have a code that is failing type checking because it call
a.keys().tolist()
, while it does work as intended.The text was updated successfully, but these errors were encountered: