Closed
Description
Describe the bug
Upgrading from 2.0.1 to 2.1.1 and now I get errors about Series and Index that aren't helpful. It should not be necessary to duplicate type hints on a local variable.
To Reproduce
- Provide a minimal runnable
pandas
example that is not properly checked by the stubs.
idx0 = pd.Index()
idx1: pd.Index = pd.Index()
sr0 = pd.Series()
sr1: pd.Series = pd.Series()
-
Indicate which type checker you are using (
mypy
orpyright
).
mypy -
Show the error message received from that type checker while checking your example.
error: Need type annotation for "idx0" [var-annotated]
error: Need type annotation for "sr0" [var-annotated]
Please complete the following information:
- OS: [e.g. Windows, Linux, MacOS]
- Linux
- OS Version [e.g. 22]
- python version
- 3.8
- version of type checker
- 1.7.1
- version of installed
pandas-stubs
- 2.1.1 and 2.0.3 failing, 2.0.1 no error
Metadata
Metadata
Assignees
Labels
No labels