-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
C: undefined-variableIssues related to 'undefined-variable' checkIssues related to 'undefined-variable' checkC: 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 codepy-versionpython 3.14typing
Milestone
Description
Bug description
In 3.14, evaluation of annotations is deferred. Pylint raises undefined-variable for the field annotation below, but in 3.14 this is a false positive.
class X:
x: X # <-- undefined-variable
Configuration
Command used
pylint annotation.py
Pylint output
annotation.py:2:7: E0602: Undefined variable 'X' (undefined-variable)
Expected behavior
no warning
Pylint version
pylint 3.3.2
astroid 3.3.6
Python 3.14.0a3+ (heads/main:2a66dd33dfc, Dec 21 2024, 16:04:14) [GCC 9.4.0]
OS / Environment
No response
Additional dependencies
Metadata
Metadata
Assignees
Labels
C: undefined-variableIssues related to 'undefined-variable' checkIssues related to 'undefined-variable' checkC: 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 codepy-versionpython 3.14typing