-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
CLN: fix mypy errors in pandas/tests/extension/test_numpy.py #28926 #28947
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukasbk Thanks for the PR. minor comments.
pandas/tests/extension/base/ops.py
Outdated
frame_scalar_exc = TypeError | ||
series_array_exc = TypeError | ||
divmod_exc = TypeError | ||
series_scalar_exc = TypeError # type: Union[Type[Exception], None] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]
does this also fix the errors in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great thanks @lukasbk ! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff