Skip to content

Commit

Permalink
Fixed mypy error in test_json.py
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
lukasbk committed Oct 15, 2019
1 parent ea903c9 commit 8e8daed
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion pandas/tests/extension/json/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def assert_series_equal(self, left, right, **kwargs):
name=right.name,
)
tm.assert_series_equal(left, right, **kwargs)

def assert_frame_equal(self, left, right, *args, **kwargs):
tm.assert_index_equal(
left.columns,
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ ignore_errors=True
[mypy-pandas.tests.extension.json.array]
ignore_errors=True

[mypy-pandas.tests.extension.json.test_json]
ignore_errors=True

[mypy-pandas.tests.frame.test_constructors]
ignore_errors=True

Expand Down

0 comments on commit 8e8daed

Please sign in to comment.