Fixit
Fixit copied to clipboard
[F402] Warn on loop variable shadowing module name
I think we need more variety of test cases, covering things like loops with multiple elements (or deep names), as well as some validating things like import a.b where a is the name that might be shadowed, but b isn't. Take a look at upstream pyflakes tests (search for "shadow" to find instances), and see what other cases we can cover from their examples.
I didn't see much in the pyflakes project (searched "shadow" and a few other keywords), but I did add more tests!