Missing W0612: Unused variable
warning if exception name is being reused
#6077
Labels
Duplicate 🐫
Duplicate of an already existing issue
Bug description
Save the following code in a file like
pylint_test.py
.Configuration
No response
Command used
Pylint output
`pylint_bug.py:17:4: W0612: Unused variable 'exception' (unused-variable)` when line 19 is not commented and line 21 is commented, nothing when line 19 is commented and line 21 is not.
Expected behavior
I would expect to get a "unused variable" warning for line 26 at least when commenting line 19 and uncommenting line 21, like:
pylint_test.py:26:4: W0612: Unused variable 'exception' (unused-variable)
Pylint version
OS / Environment
Opensuse Tumbleweed
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: