Skip to content

pyright 1.1.398 breaks simple type checking with pandas-stubs #10248

@Dr-Irv

Description

@Dr-Irv

Describe the bug
If you install pandas and pandas-stubs, then basic type checking fails with 1.1.398 but works with 1.1.397

Code or Screenshots

import pandas as pd
from pandas._typing import TimeUnit
i0 = pd.date_range(start="2022-06-01", periods=10)
s0 = pd.Series(i0)
print(s0.dt.unit)

VS Code extension or command-line

pyright 1.1.398 fails, pyright 1.1.397 works fine.

Just create an environment and install pandas and pandas-stubs using pip.

Error that is reported is:

tunit.py:2:28 - error: "TimeUnit" is not exported from module "pandas._typing" (reportPrivateImportUsage)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions