Skip to content

fix #28926 pandas\api\test_api.py mypy errors #28935

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 11 commits into from
Oct 13, 2019
11 changes: 6 additions & 5 deletions pandas/tests/api/test_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pandas as pd
from pandas import api, compat
from pandas.util import testing as tm
from typing import List


class Base:
Expand Down Expand Up @@ -41,7 +42,7 @@ class TestPDApi(Base):
]

# these are already deprecated; awaiting removal
deprecated_modules = []
deprecated_modules: List[str] = []

# misc
misc = ["IndexSlice", "NaT"]
Expand Down Expand Up @@ -92,10 +93,10 @@ class TestPDApi(Base):
classes.extend(["Panel", "SparseSeries", "SparseDataFrame"])

# these are already deprecated; awaiting removal
deprecated_classes = []
deprecated_classes: List[str] = []

# these should be deprecated in the future
deprecated_classes_in_future = []
deprecated_classes_in_future: List[str] = []

# external modules exposed in pandas namespace
modules = ["np", "datetime"]
Expand Down Expand Up @@ -171,10 +172,10 @@ class TestPDApi(Base):
funcs_to = ["to_datetime", "to_msgpack", "to_numeric", "to_pickle", "to_timedelta"]

# top-level to deprecate in the future
deprecated_funcs_in_future = []
deprecated_funcs_in_future: List[str] = []

# these are already deprecated; awaiting removal
deprecated_funcs = []
deprecated_funcs: List[str] = []

# private modules in pandas namespace
private_modules = [
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ no_implicit_optional=True
ignore_errors=True

[mypy-pandas.tests.api.test_api]
ignore_errors=True
ignore_errors=False

[mypy-pandas.tests.arithmetic.test_datetime64]
ignore_errors=True
Expand Down