Skip to content
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

[pyflakes] Detect assignments that shadow definitions (F811) #11961

Merged
merged 3 commits into from
Jun 23, 2024

Conversation

ukyen8
Copy link
Contributor

@ukyen8 ukyen8 commented Jun 21, 2024

Summary

This PR updates F811 rule to include assignment as possible shadowed binding. This will fix issue: #11828 .

Test Plan

Add a test file, F811_30.py, which includes a redefinition after an assignment and a verified snapshot file.

@ukyen8 ukyen8 marked this pull request as ready for review June 21, 2024 12:04
@charliermarsh charliermarsh self-assigned this Jun 23, 2024
@charliermarsh charliermarsh changed the title fix(F811): assignment can also be shadowed binding [pyflakes] Detect assignments that shadow definitions (F811) Jun 23, 2024
@charliermarsh charliermarsh added the bug Something isn't working label Jun 23, 2024
Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Thanks!

@charliermarsh charliermarsh merged commit 068b75c into astral-sh:main Jun 23, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants