-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
C: used-before-assignmentIssues related to 'used-before-assignment' checkIssues related to 'used-before-assignment' checkFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Milestone
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.pyPylint 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
97gamjak
Metadata
Metadata
Assignees
Labels
C: used-before-assignmentIssues related to 'used-before-assignment' checkIssues related to 'used-before-assignment' checkFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation