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

implement B035 check for static keys in dict-comprehension #426

Merged
merged 2 commits into from
Nov 26, 2023

Conversation

r-downing
Copy link
Contributor

Implementing static-key check for dict comprehension from #391

This not only checks for hard-coded consts, but also variables that likely aren't changing as part of the generator expression

@r-downing r-downing marked this pull request as ready for review November 26, 2023 21:04
bugbear.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

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

Awesome. Many thanks for this. Check totally makes sense.

Gonna sync us to latest black and get a release out tonight.

@cooperlees cooperlees merged commit 7196efa into PyCQA:main Nov 26, 2023
6 checks passed
@r-downing r-downing deleted the dict-comp-static-key branch December 1, 2023 17:58
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