Skip to content

Commit 04d7931

Browse files
yogendrasoniWillAyd
authored andcommitted
fix #28926 pandas\api\test_api.py mypy errors (#28935)
* fix #28926 pandas\api\test_api.py mypy errors * fix #28926 pandas\api\test_api.py mypy errors * changed to type comment to support v 3.5 * removed section mypy-pandas.tests.api.test_api * fix annotation and revert delete * fix import sorting * fix import sorting
1 parent 2931f02 commit 04d7931

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Diff for: pandas/tests/api/test_api.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import List
2+
13
import pandas as pd
24
from pandas import api, compat
35
from pandas.util import testing as tm
@@ -41,7 +43,7 @@ class TestPDApi(Base):
4143
]
4244

4345
# these are already deprecated; awaiting removal
44-
deprecated_modules = []
46+
deprecated_modules = [] # type: List[str]
4547

4648
# misc
4749
misc = ["IndexSlice", "NaT"]
@@ -92,10 +94,10 @@ class TestPDApi(Base):
9294
classes.extend(["Panel", "SparseSeries", "SparseDataFrame"])
9395

9496
# these are already deprecated; awaiting removal
95-
deprecated_classes = []
97+
deprecated_classes = [] # type: List[str]
9698

9799
# these should be deprecated in the future
98-
deprecated_classes_in_future = []
100+
deprecated_classes_in_future = [] # type: List[str]
99101

100102
# external modules exposed in pandas namespace
101103
modules = ["np", "datetime"]
@@ -171,10 +173,10 @@ class TestPDApi(Base):
171173
funcs_to = ["to_datetime", "to_msgpack", "to_numeric", "to_pickle", "to_timedelta"]
172174

173175
# top-level to deprecate in the future
174-
deprecated_funcs_in_future = []
176+
deprecated_funcs_in_future = [] # type: List[str]
175177

176178
# these are already deprecated; awaiting removal
177-
deprecated_funcs = []
179+
deprecated_funcs = [] # type: List[str]
178180

179181
# private modules in pandas namespace
180182
private_modules = [

Diff for: setup.cfg

-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ no_implicit_optional=True
133133
[mypy-pandas.conftest]
134134
ignore_errors=True
135135

136-
[mypy-pandas.tests.api.test_api]
137-
ignore_errors=True
138-
139136
[mypy-pandas.tests.arithmetic.test_datetime64]
140137
ignore_errors=True
141138

0 commit comments

Comments
 (0)