-
-
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
Fix used-before-assignment
false negative for nonlocals
#10075
Fix used-before-assignment
false negative for nonlocals
#10075
Conversation
5b626da
to
a7c28bd
Compare
we should probably skip changelog for this one? as it is more of an internal update |
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## main #10075 +/- ##
=======================================
Coverage 95.80% 95.80%
=======================================
Files 174 174
Lines 18959 18962 +3
=======================================
+ Hits 18163 18166 +3
Misses 796 796
|
a7c28bd
to
f347162
Compare
This comment has been minimized.
This comment has been minimized.
f347162
to
db56fc9
Compare
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit db56fc9 |
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.
Thank you !
Type of Changes
Description
A continuation of #10034. This PR addresses the case where a nonlocal declaration exists outside the immediate enclosing frame for both the usage and definition.
Changes primarily extend the check for nonlocal declarations so that it stops once it reaches the first enclosing frame, ensuring that it does not go beyond the initial enclosing frame.
Closes #10069