Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.14 annotation evaluation is deferred #10149

Open
nickdrozd opened this issue Dec 22, 2024 · 0 comments
Open

3.14 annotation evaluation is deferred #10149

nickdrozd opened this issue Dec 22, 2024 · 0 comments
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code py-version python 3.14

Comments

@nickdrozd
Copy link
Contributor

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

@nickdrozd nickdrozd added False Positive 🦟 A message is emitted but nothing is wrong with the code py-version labels Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code py-version python 3.14
Projects
None yet
Development

No branches or pull requests

2 participants