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

[Backport maintenance/3.2.x] Fix a false positive for redefined-outer-name #9695

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 4, 2024

Backport 57ae027 from #9678.

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)
@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Jun 4, 2024
@Pierre-Sassoulas Pierre-Sassoulas added this to the 3.2.3 milestone Jun 4, 2024
@Pierre-Sassoulas Pierre-Sassoulas enabled auto-merge (squash) June 4, 2024 22:04
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.82%. Comparing base (769ffd2) to head (00d2ee0).
Report is 29 commits behind head on maintenance/3.2.x.

Additional details and impacted files

Impacted file tree graph

@@                  Coverage Diff                  @@
##           maintenance/3.2.x    #9695      +/-   ##
=====================================================
- Coverage              95.84%   95.82%   -0.02%     
=====================================================
  Files                    174      174              
  Lines                  18915    18827      -88     
=====================================================
- Hits                   18129    18041      -88     
  Misses                   786      786              
Files with missing lines Coverage Δ
pylint/checkers/variables.py 97.36% <100.00%> (+<0.01%) ⬆️

... and 90 files with indirect coverage changes

@Pierre-Sassoulas Pierre-Sassoulas merged commit 7e5e4f9 into maintenance/3.2.x Jun 4, 2024
24 of 25 checks passed
@Pierre-Sassoulas Pierre-Sassoulas deleted the backport-9678-to-maintenance/3.2.x branch June 4, 2024 22:19
@Pierre-Sassoulas Pierre-Sassoulas modified the milestone: 3.2.3 Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants