-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
STY: Enable ruff pytest checks #56671
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
# Introduce NaNs | ||
(["a", "b", "c"], ["a", "b"], ["a"]), | ||
(["a", "b", "c"], ["a", "b"], ["b"]), | ||
(["b", "a", "c"], ["a", "b"], ["a"]), | ||
(["b", "a", "c"], ["a", "b"], ["a"]), |
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.
Should this be "b"?
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 catch. Fixed
@@ -73,12 +73,10 @@ def test_set_dtype_new_categories(self): | |||
(["a", "b", "c"], ["a", "b"], ["a", "b"]), | |||
(["a", "b", "c"], ["a", "b"], ["b", "a"]), | |||
(["b", "a", "c"], ["a", "b"], ["a", "b"]), | |||
(["b", "a", "c"], ["a", "b"], ["a", "b"]), |
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.
Should this end with ["b", "a"]?
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 catch. Fixed
@@ -210,7 +210,8 @@ def test_setitem_integer_array(self, data, idx, box_in_series): | |||
[0, 1, 2, pd.NA], True, marks=pytest.mark.xfail(reason="GH-31948") | |||
), | |||
(pd.array([0, 1, 2, pd.NA], dtype="Int64"), False), | |||
(pd.array([0, 1, 2, pd.NA], dtype="Int64"), False), | |||
# TODO: change False to True? | |||
(pd.array([0, 1, 2, pd.NA], dtype="Int64"), False), # noqa: PT014 |
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.
Hm, this is a dupe right?
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.
Yup but changing it to True
fails a few tests so adding a noqa for now
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.
Can you open an issue as a followup?
(the noqa makes it look like ruff had a false positive)
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.
Sure, #56727
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.
Left a couple more comments.
Thanks for cleaning these up by the way!
@@ -1555,7 +1555,6 @@ def test_constructor_mixed_type_rows(self): | |||
"tuples,lists", | |||
[ | |||
((), []), | |||
((()), []), |
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.
Hm, was this supposed to contain an inner tuple like
((),)
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.
Ah possibly yes. That passes here so added it
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.
pretty cool - nice work!
* Enable PT001 * Add PT002 * Add PT003 * ignore 4 and 5 * Ignore 6, 7, 8 * Ignore PT009 * Enable PT010 * Enable PT011 * Ignore 12, enable 13 * Enable PT014 * Enforce PT015 * Enable 16 * Disable 17 * Ignore 18 * Ignore 19 * Add 20 * add 21 * Enable 22 * Add 23 * Add 24 * Add 25 * add 26 * Add 27 * use PT * fix some tests * Deduplcate test * Add tests * Added nested tuple case
No description provided.