You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
String type hints used in Annotated should be imported in TYPE_CHECKING section, but ruff remove imports for now.
I think ruff should treat the first argument of Annotated similar to the current behavior for ClassVar.
fromtypesimportFunctionType# `types.FunctionType` imported but unused F401fromtypingimportAnnotatedFunc=Annotated["FunctionType", int]
ruff 0.3.0
The text was updated successfully, but these errors were encountered:
## Summary
I think this code has existed since the start of `typing.Annotated`
support (#333), and was then
overlooked over a series of refactors.
Closes#10279.
nkxxll
pushed a commit
to nkxxll/ruff
that referenced
this issue
Mar 10, 2024
)
## Summary
I think this code has existed since the start of `typing.Annotated`
support (astral-sh#333), and was then
overlooked over a series of refactors.
Closesastral-sh#10279.
String type hints used in Annotated should be imported in TYPE_CHECKING section, but ruff remove imports for now.
I think ruff should treat the first argument of Annotated similar to the current behavior for ClassVar.
ruff 0.3.0
The text was updated successfully, but these errors were encountered: