Skip to content

TYP: enable reportMissingImports #43790

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

Merged
merged 7 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/_libs/reshape.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

import pandas._tying as npt
from pandas._typing import npt
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could replace
from pandas._typing import npt
with
import numpy.typing as npt
in stub files, as I think they will not be executed at run-time - cannot fail even if an old version of numpy is installed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, since we don't need to guard the import at run-time for stub files sgtm.


def unstack(
values: np.ndarray, # reshape_t[:, :]
Expand Down
2 changes: 1 addition & 1 deletion pandas/_libs/tslibs/timedeltas.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ from typing import (
)

import numpy as np
from pands._typing import npt

from pandas._libs.tslibs import (
NaTType,
Tick,
)
from pandas._typing import npt

_S = TypeVar("_S")

Expand Down
1 change: 1 addition & 0 deletions pandas/io/excel/_pyxlsb.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pyright: reportMissingImports=false
from __future__ import annotations

from pandas._typing import (
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,13 @@ skip = "pandas/__init__.py"
pythonVersion = "3.8"
typeCheckingMode = "strict"
include = ["pandas"]
exclude = ["pandas/tests", "pandas/util/version"]
exclude = ["pandas/tests", "pandas/io/clipboard", "pandas/util/version"]
reportGeneralTypeIssues = false
reportConstantRedefinition = false
reportFunctionMemberAccess = false
reportImportCycles = false
reportIncompatibleMethodOverride = false
reportIncompatibleVariableOverride = false
reportMissingImports = false
reportMissingModuleSource = false
reportMissingTypeArgument = false
reportMissingTypeStubs = false
Expand Down