Closed
Description
Describe the bug
False positive error warning when using iloc
function.
To Reproduce
Using pyright on
import pandas as pd
df = pd.DataFrame({'Char': ['A', 'B', 'C'], 'Number': [1, 2, 3]})
df = df.iloc[0:2,]
produces
Argument of type "tuple[slice]" cannot be assigned to parameter "idx" of type "IndexType | MaskType | Tuple[IndexType | MaskType, IndexType | MaskType]" in function "__getitem__" Type "tuple[slice]" cannot be assigned to type "IndexType | MaskType | Tuple[IndexType | MaskType, IndexType | MaskType]" "tuple[slice]" is incompatible
Please complete the following information:
- OS: ArchLinux
- python 3.10.5
- pyright 1.1.260
- pandas-stub 1.4.3.220704
Metadata
Metadata
Assignees
Labels
No labels