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

Enable module-level checks for B018 #315

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

inwaves
Copy link
Contributor

@inwaves inwaves commented Dec 7, 2022

Hi!

This PR addresses #267 and enables B018 checks for module-level statements. I'm doing this by visiting the Module component in the AST first, and then any children. Let me know if I've missed anything.

Thanks!

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! Module level unless assignments are very worth removing. Nice addition. This could be helpful in big modules.

@cooperlees cooperlees merged commit a751ead into PyCQA:main Dec 8, 2022
@inwaves inwaves deleted the bug/FixB018ModuleBehaviour branch December 23, 2022 05:22
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