Skip to content

Enforce ruff/Perflint rules (PERF)#265

Merged
jaraco merged 5 commits intopypa:mainfrom
DimitriPapadopoulos:PERF
Aug 22, 2024
Merged

Enforce ruff/Perflint rules (PERF)#265
jaraco merged 5 commits intopypa:mainfrom
DimitriPapadopoulos:PERF

Conversation

@DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Jun 29, 2024

I have not applied this one:

PERF203 `try`-`except` within a loop incurs performance overhead

I believe the rest of the changes result in more readable code, but I am not certain about this one. In the absence of measured performance gains, I have left it out. I am happy to apply the PERF203 rule as well if you want me too.

Copy link
Member

@jaraco jaraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I have a few comments/suggestions, and a TODO for me to investigate what's going on with the diff.

PERF102 When using only the values of a dict use the `values()` method
PERF402 Use `list` or `list.copy` to create a copy of a list
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the PERF branch 2 times, most recently from edfa8e0 to df62fc3 Compare August 22, 2024 14:45
@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Aug 22, 2024

About the previous CI failure: my "fix" for PERF403 was completely wrong. Tests pass now.

@jaraco jaraco merged commit d776697 into pypa:main Aug 22, 2024
@DimitriPapadopoulos DimitriPapadopoulos deleted the PERF branch August 23, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants