-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Ruff: enable all pyflakes and perf rules #4556
Ruff: enable all pyflakes and perf rules #4556
Conversation
1f341a8
to
ca0f6c7
Compare
22a9da2
to
5345768
Compare
5345768
to
5aed410
Compare
5aed410
to
acf10fd
Compare
acf10fd
to
1f4b082
Compare
1f4b082
to
01c7ce4
Compare
It's been a couple PRs where the PyPy test gets randomly cancelled, that's weird |
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.
Thank you very much.
@@ -2187,7 +2187,7 @@ def get_args(cls, dist, header=None): | |||
spec = str(dist.as_requirement()) | |||
for type_ in 'console', 'gui': | |||
group = type_ + '_scripts' | |||
for name, ep in dist.get_entry_map(group).items(): | |||
for name in dist.get_entry_map(group).keys(): |
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.
If we are not using the values, then we can just iterate over the original object no? There would be no reason to call .keys()
, 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.
yeah iterating over a dict should be the same as iterating over its keys since we don't do anything special with the view-object. I kept it consistent with other places in code. (this might be an opiniated preference)
cccadd2
to
d771884
Compare
Thank you @Avasam. |
Summary of changes
Setuptools conforms to all the Ruff-implemented Pyflakes and Perflint rules except
PERF203
and a single instance ofPERF102
. So we can be less picky about their selection.PERF203
is worth looking at, but is often a micro-optimisation with false-positives, let's not block the CI on that. I applied it on some tests.Pull Request Checklist
newsfragments/
. (no public-facing change)(See documentation for details)