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

Update collection literals and comprehensions #2108

Merged

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Aug 22, 2023

Extracted from, and improved over #2100
These were found by running ruff . --select=C4 --exclude=build --exclude=Pythonwin/Scintilla --exclude=adodbapi
Documentation: https://beta.ruff.rs/docs/rules/#flake8-comprehensions-c4

This PR uses more modern collection literals and comprehensions where applicable. There's some expected performance gains here from the use of comprehensions and less function call overhead. On top of often more concise syntax

@mhammond mhammond merged commit 56ecf8c into mhammond:main Sep 21, 2023
@Avasam Avasam deleted the Update-collections-literals-and-comprehensions branch September 21, 2023 16:28
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