You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is a bug in checkers.utils.is_error. The docstring claims to "return true if the function does nothing but raising an exception", but it doesn't catch cases like this where the function may return early. This causes VariablesChecker.leave_functiondef to skip checking for unused variables.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Create a file like this:
python3 -m pylint test.py
Current behavior
Expected behavior
I expected "unused-variable" for
my_var
. This did come up for pylint 1.8.3.pylint --version output
My thoughts
I think this is a bug in
checkers.utils.is_error
. The docstring claims to "return true if the function does nothing but raising an exception", but it doesn't catch cases like this where the function may return early. This causesVariablesChecker.leave_functiondef
to skip checking for unused variables.The text was updated successfully, but these errors were encountered: