-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
python314Related to Python 3.14Related to Python 3.14ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
In 3.14, type annotations are not evaluated eagerly.
https://docs.python.org/3.14/whatsnew/3.14.html#whatsnew314-pep649
So this snippet runs fine:
class X:
x: XRuff flags the field annotation as an undefined name. It is undefined in 3.13 and earlier, but in 3.14 this is a false positive. Earlier versions require from __future__ import annotations to make this work.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
python314Related to Python 3.14Related to Python 3.14ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule