Skip to content

Conversation

Copy link
Collaborator

@amyreese amyreese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs formatting fixes (make format or hatch run lint:fix).

@amyreese
Copy link
Collaborator

amyreese commented Mar 8, 2023

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.

@ansley
Copy link
Author

ansley commented Mar 14, 2023

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

@ansley ansley changed the title [F402] Warn on module name shadowing [F402] Warn on loop variable shadowing module name Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. lint rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants