Fixit icon indicating copy to clipboard operation
Fixit copied to clipboard

[F402] Warn on loop variable shadowing module name

Open ansley opened this issue 2 years ago • 2 comments

Stack from ghstack (oldest at bottom):

  • #277
  • #276
  • #275
  • #274
  • #273
  • -> #272
  • #271

ansley avatar Mar 08 '23 16:03 ansley

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.

amyreese avatar Mar 08 '23 22:03 amyreese

I didn't see much in the pyflakes project (searched "shadow" and a few other keywords), but I did add more tests!

ansley avatar Mar 14 '23 14:03 ansley