Closed
Description
Bug description
# pylint: disable=missing-module-docstring,invalid-name
import sys
if input("Enter something or nothing: "):
sys.exit()
else:
a = 1
print(a)
Configuration
No response
Command used
pylint test.py
Pylint output
************* Module test
test.py:8:6: E0606: Possibly using variable 'a' before assignment (possibly-used-before-assignment)
Expected behavior
Branches which end in a function which never returns shouldn't be considered as possible causes of never defined variables.
Pylint version
pylint 3.2.0
astroid 3.2.0
Python 3.11.7 | packaged by conda-forge | (main, Dec 23 2023, 14:43:09) [GCC 12.3.0]
OS / Environment
No response
Additional dependencies
No response