---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
TC004 [*] Move import `foo.Foo` out of type-checking block. Import is used for more than type hinting.
 --> <filename>:6:21
  |
4 | from typing import TYPE_CHECKING, TypeAlias
5 | if TYPE_CHECKING:
6 |     from foo import Foo  # TC004
  |                     ^^^
7 |
8 | a: TypeAlias = Foo | None  # OK
  |                --- Used at runtime here
  |
help: Move out of type-checking block
  |
4 | from typing import TYPE_CHECKING, TypeAlias
5 + from foo import Foo
6 | if TYPE_CHECKING:
  -     from foo import Foo  # TC004
7 +     pass  # TC004
8 |
  |
note: This is an unsafe fix and may change runtime behavior
