-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Bug 🪲False Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the codeHigh effort 🏋Difficult solution or problem to solveDifficult solution or problem to solve
Description
Steps to reproduce
Given a file a.py:
#pylint: disable=missing-docstring
def function():
unused = 1 # [unused-variable]
try:
1 / 0
except ZeroDivisionError as error: # [unused-variable]
try:
1 / 0
except ZeroDivisionError as error:
raise Exception("") from errorCurrent behavior
************* Module a
a.py:4:4: W0612: Unused variable 'unused' (unused-variable)
------------------------------------------------------------------
Your code has been rated at 8.89/10 (previous run: 8.89/10, +0.00)
Expected behavior
************* Module a
a.py:4:4: W0612: Unused variable 'unused' (unused-variable)
a.py:8:30: W0612: Unused variable 'error' (unused-variable)
pylint --version output
pylint 2.7.4
astroid 2.5.3
Python 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0]
Metadata
Metadata
Assignees
Labels
Bug 🪲False Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the codeHigh effort 🏋Difficult solution or problem to solveDifficult solution or problem to solve