Ruff currently emits no F821 errors on this `.py` file, but the lines marked with `XXX` all fail at runtime due to undefined names: ```py from __future__ import annotations from typing import TypeAlias, Optional, Union MaybeCStr: TypeAlias = Optional[CStr] # XXX MaybeCStr2: TypeAlias = Optional["CStr"] # always okay CStr: TypeAlias = Union[C, str] # XXX CStr2: TypeAlias = Union["C", str] # always okay class C: ... class Leaf: ... class Tree(list[Tree | Leaf]): ... # XXX class Tree2(list["Tree | Leaf"]): ... # always okay ``` Note: - Ruff correctly emits three errors on this file when `from __future__ import annotations` is not included - Ruff correctly emits no errors on this file if it's a `.pyi` stub file.