Open
Description
Bug description
This produces a using 'x' before assignment error:
"""pylint_false_positive.py"""
def test():
try:
try:
x = None
except:
x = None
raise
finally:
print("x", x)
Configuration
No response
Command used
pylint -E pylint_false_positive.py
Pylint output
************* Module pylint_false_positive
pylint_false_positive.py:10: [E0601(used-before-assignment), test] Using variable 'x' before assignment
Expected behavior
Expected no error, x is assigned in all branches.
Pylint version
pylint 2.14.5
astroid 2.11.7
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
OS / Environment
No response
Additional dependencies
No response