Skip to content
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 comprehensions and performance #2021

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Nov 23, 2024

Various list, dict, set comprehension, and performance improvements.

% ruff check --select=C4,PERF --statistics

61	C408   	[*] unnecessary-collection-call
57	C419   	[*] unnecessary-comprehension-in-call
50	C403   	[*] unnecessary-list-comprehension-set
23	PERF401	[ ] manual-list-comprehension
19	PERF203	[ ] try-except-in-loop
18	C401   	[*] unnecessary-generator-set
15	PERF102	[*] incorrect-dict-iterator
 9	C400   	[*] unnecessary-generator-list
 6	PERF402	[ ] manual-list-copy
 3	C405   	[*] unnecessary-literal-set
 2	C414   	[*] unnecessary-double-cast-or-process
 2	C416   	[*] unnecessary-comprehension
 1	PERF403	[ ] manual-dict-comprehension
[*] fixable with `ruff check --fix`

% ruff check --select=C4,PERF --fix --unsafe-fixes --output-format=concise

Found 265 errors (216 fixed, 49 remaining).

@cclauss cclauss changed the base branch from stable to dev November 23, 2024 07:33
@TheTechromancer TheTechromancer self-assigned this Nov 23, 2024
@TheTechromancer TheTechromancer merged commit 15464b6 into blacklanternsecurity:dev Nov 23, 2024
14 checks passed
@cclauss cclauss deleted the ruff-comprehensions-and-performance branch November 23, 2024 17:17
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