Not seeing E0601 where in a pretty obvious code path, where code execution does show UnboundLocalError #9305
Labels
C: used-before-assignment
Issues related to 'used-before-assignment' check
Duplicate 🐫
Duplicate of an already existing issue
Bug description
Configuration
# default
Command used
Pylint output
Expected behavior
I was expecting to see the following Error
test.py:13:14: E0601: Using variable 'result' before assignment (used-before-assignment)
I was expecting to see this error for the print(result) outside the except block.
(xrg-382) bash-4.4$ pylint test.py
************* Module test
test.py:13:14: E0601: Using variable 'result' before assignment (used-before-assignment)
Your code has been rated at 5.83/10 (previous run: 10.00/10, -4.17)
Pylint version
OS / Environment
(xrg-382) bash-4.4$ uname -a
Linux sjc-ads-5995 4.18.0-305.7.1.el8_4.x86_64 #1 SMP Mon Jun 14 17:25:42 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: