Skip to content

Commit 8e8daed

Browse files
committed
Fixed mypy error in test_json.py
The error is due to the fact that the builtins.staticmethod type defined in extension.base.base.BaseExtensionTests does not match the function type in extension.json.test_json.BaseJSON. I don't see a possibility for a type hint fix without changing the structure of the code. One way would be to replace the call of staticmethod by function definitions that call the corresponding methods. Here I propose an easier suppression of the error using type: Any. What do you think?
1 parent ea903c9 commit 8e8daed

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

pandas/tests/extension/json/test_json.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ def assert_series_equal(self, left, right, **kwargs):
9393
name=right.name,
9494
)
9595
tm.assert_series_equal(left, right, **kwargs)
96-
9796
def assert_frame_equal(self, left, right, *args, **kwargs):
9897
tm.assert_index_equal(
9998
left.columns,

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ ignore_errors=True
160160
[mypy-pandas.tests.extension.json.array]
161161
ignore_errors=True
162162

163-
[mypy-pandas.tests.extension.json.test_json]
164-
ignore_errors=True
165-
166163
[mypy-pandas.tests.frame.test_constructors]
167164
ignore_errors=True
168165

0 commit comments

Comments
 (0)