-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: annotations, fix test_invert #54576
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
Conversation
pandas/tests/extension/base/ops.py
Outdated
expected = pd.Series(~data, name="name") | ||
tm.assert_series_equal(result, expected) | ||
try: | ||
[~x for x in data] |
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.
Maybe for x in data.unique(): ~x
so we process and minimize collecting values.
Also should the data.dtype.na_value
be skipped when trying invert?
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.
ill just make it data[:10]
. if ~na_value raises im not sure what id expect ~data to do, so prefer to leave that as is
@@ -18,6 +18,7 @@ | |||
|
|||
from pandas.core.dtypes.dtypes import IntervalDtype | |||
|
|||
import pandas as pd |
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.
Good to put in if TYPE_CHECKING
?
Thanks @jbrockmendel |
* TST: annotations, fix test_invert * mypy fixup * trim runtime * use TYPE_CHECKING * xfail fixed
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.