Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 5 additions & 4 deletions pandas/tests/extension/base/ops.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import operator
from typing import Type, Union

import pytest

Expand Down Expand Up @@ -61,10 +62,10 @@ class BaseArithmeticOpsTests(BaseOpsUtil):
* divmod_exc = TypeError
"""

series_scalar_exc = TypeError
frame_scalar_exc = TypeError
series_array_exc = TypeError
divmod_exc = TypeError
series_scalar_exc = TypeError # type: Union[Type[Exception], None]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
series_scalar_exc = TypeError # type: Union[Type[Exception], None]
series_scalar_exc = TypeError # type: Optional[Type[TypeError]]

I think we don't need to be more permissive on the error type here.

also, we tend to use Optional[<type>] instead of Union[<type>, None]

frame_scalar_exc = TypeError # type: Union[Type[Exception], None]
series_array_exc = TypeError # type: Union[Type[Exception], None]
divmod_exc = TypeError # type: Union[Type[Exception], None]

def test_arith_series_with_scalar(self, data, all_arithmetic_operators):
# series & scalar
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ ignore_errors=True
[mypy-pandas.tests.extension.json.test_json]
ignore_errors=True

[mypy-pandas.tests.extension.test_numpy]
ignore_errors=True

[mypy-pandas.tests.extension.test_sparse]
ignore_errors=True

Expand Down