[Linter panic] when fixing TCH003
violation for typing
import
#5331
Labels
bug
Something isn't working
TCH003
violation for typing
import
#5331
Ruff settings and version
Version:
0.0.275
Settings
Description
When I try to autofix a
TCH003
violation for an import fromtyping
, I get the following stack trace:I have confirmed this only occurs for imports from
typing
.Files
I used two files for testing, one using an import from
typing
and one fromcollections.abc
:non_typing.py
Running
ruff check non_typing.py --fix
works as expectedtyping.py
However if I run
ruff check typing.py --fix
I get the stacktrace above.This also occurs for
typing
imports that aren't part ofcollections.abc
as well. e.g.Any
.The text was updated successfully, but these errors were encountered: