Commit 7e5e4f9
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 <31762852+mbyrnepr2@users.noreply.github.com>
1 parent 769ffd2 commit 7e5e4f9
File tree
3 files changed
+34
-0
lines changed- doc/whatsnew/fragments
- pylint/checkers
- tests/functional/r/redefined
3 files changed
+34
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1519 | 1519 | | |
1520 | 1520 | | |
1521 | 1521 | | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1522 | 1531 | | |
1523 | 1532 | | |
1524 | 1533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
0 commit comments