We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from __future__ import annotations
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
XXX
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:
.pyi
The text was updated successfully, but these errors were encountered:
The PR fixing this was reverted in #10513
Sorry, something went wrong.
AlexWaygood
Successfully merging a pull request may close this issue.
Ruff currently emits no F821 errors on this
.py
file, but the lines marked withXXX
all fail at runtime due to undefined names:Note:
from __future__ import annotations
is not included.pyi
stub file.The text was updated successfully, but these errors were encountered: