Closed
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: X
Ruff 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.