-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
STY: Enable pygrep ruff checks #53062
Conversation
|
||
# TODO(wesm), incomplete test? | ||
indexed_frame = DataFrame(data, index=index) # noqa | ||
unindexed_frame = DataFrame(data) # noqa |
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.
did you make a decision to remove this or was it automated? id be OK with the former
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.
I made the decision to remove this since it didn't seem clear that this would be fixed
pandas/_libs/lib.pyi
Outdated
@@ -30,7 +30,7 @@ from enum import Enum | |||
class _NoDefault(Enum): | |||
no_default = ... | |||
|
|||
no_default: Final = _NoDefault.no_default # noqa | |||
no_default: Final = ... |
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.
I think this will break some type annotations
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.
typeshed also does this python/typeshed#7127 not sure whether this is a "bug" in ruff
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 okay thanks I'll add back the noqa
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.
generally looks good, nice, have just left a question (also, the typing comment)
def test_index_from_series_copy(using_copy_on_write): | ||
def test_index_from_series_copy(): |
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.
why remove using_copy_on_write
?
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.
Oops, I removed this by accident. I reverted this
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.
minor comments, rest looks good
@@ -265,7 +265,7 @@ def test_from_records_to_records(self): | |||
arr[:] = [(1, 2.0, "Hello"), (2, 3.0, "World")] | |||
|
|||
# TODO(wesm): unused |
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 be removed 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.
Yup. Removed
result = empty_float.fillna(value=0) # noqa | ||
float_frame.reindex(columns=[]) |
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.
might want to keep the fillna
?
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 good catch. Added back
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.
nice one @mroeschke
* STY: Enable pygrep ruff checks * Address comments * Uncomment code * Address comments
* STY: Enable pygrep ruff checks * Address comments * Uncomment code * Address comments
* STY: Enable pygrep ruff checks * Address comments * Uncomment code * Address comments
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.