-
-
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 a false positive for redefined-outer-name
#9678
Fix a false positive for redefined-outer-name
#9678
Conversation
β¦e defined in an exception-handling block which shares the same name as a local variable that has been defined in a function body. Closes pylint-dev#9671
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## main #9678 +/- ##
=======================================
Coverage 95.82% 95.82%
=======================================
Files 174 174
Lines 18813 18816 +3
=======================================
+ Hits 18027 18030 +3
Misses 786 786
|
do not emit ``redefined-outer-name`` if that is the case.
This comment has been minimized.
This comment has been minimized.
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit 84f189c |
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.
π
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.
π straight to 3.2.3 !
When there is a name defined in an exception-handling block which shares the same name as a local variable that has been defined in a function body. Check if the outer node is in the scope of an exception assignment and do not emit ``redefined-outer-name`` if that is the case. Closes #9671 (cherry picked from commit 57ae027)
When there is a name defined in an exception-handling block which shares the same name as a local variable that has been defined in a function body. Check if the outer node is in the scope of an exception assignment and do not emit ``redefined-outer-name`` if that is the case. Closes #9671 (cherry picked from commit 57ae027) Co-authored-by: Mark Byrne <[email protected]>
Type of Changes
Description
Fix a false positive for
redefined-outer-name
when there is a name defined in an exception-handling block which shares the same name as a local variable that has been defined in a function body.Closes #9671