-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[flake8-builtins
] Implement import, lambda, and module shadowing
#12546
Conversation
In the commit there was a change about changing import-checking from VariableShadowing to ImportShadowing. To be consistent here we need to change it here, by removing this block (and another one with
But this is the breaking change in stable rule A001. What is the right way to do this? |
I think we should gate those blocks on "preview is disabled". So if you have preview enabled, |
44d0200
to
698e7b5
Compare
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
A005 | 104 | 104 | 0 | 0 | 0 |
A004 | 73 | 73 | 0 | 0 | 0 |
A006 | 2 | 2 | 0 | 0 | 0 |
A001 | 1 | 0 | 1 | 0 | 0 |
Thanks @charliermarsh for the idea!
Have done it this way. One tiny problem of it: if I understand the process correctly, we need to remove this check from A001 completely, once A004 will be stable. I put the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
dca83a3
to
4d56785
Compare
@alex-700 -- I added a note to |
flake8_builtins
] implement builtin-[import,lambda-argument,module]…flake8-builtins
] Implement import, lambda, and module shadowing
…-shadowing
Summary
Extend
flake8-builtins
to imports, lambda-arguments, and modules to be consistent with original checker flake8_builtins.closes #12540
Details
linter.flake8_builtins.builtins_allowed_modules
Test Plan
cargo test