-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ruff
] Fix false positive on global keyword (RUF052
)
#15235
[ruff
] Fix false positive on global keyword (RUF052
)
#15235
Conversation
ce679c7
to
70f2f89
Compare
|
@charliermarsh would you mind taking a look at my comment so that we can move forward with this PR? |
70f2f89
to
5155f96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I've reviewed the 3 snapshot files. As expected they have no "real" changes, just line numbers changing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Summary
Fixes #14996.
BTW, the issue correctly reports a false positive given that the docs say "Only local variables in function scopes are flagged by the rule".
Test Plan
I added the false positive to the fixture and verified it indeed caused a false positive before my fix was done.