[flake8-builtins] Implement import, lambda, and module shadowing#12546
[flake8-builtins] Implement import, lambda, and module shadowing#12546charliermarsh merged 3 commits intoastral-sh:mainfrom
flake8-builtins] Implement import, lambda, and module shadowing#12546Conversation
|
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 |
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-builtinsto imports, lambda-arguments, and modules to be consistent with original checker flake8_builtins.closes #12540
Details
linter.flake8_builtins.builtins_allowed_modulesTest Plan
cargo test