---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
TC001 [*] Move application import `.first_party` into a type-checking block
 --> TC001_future.py:2:19
  |
1 | def f():
2 |     from . import first_party
  |                   ^^^^^^^^^^^
3 |
4 |     def f(x: first_party.foo): ...
  |
help: Move into type-checking block
  |
  - def f():
1 + from typing import TYPE_CHECKING
2 +
3 + if TYPE_CHECKING:
4 |     from . import first_party
5 + def f():
6 |
  |
note: This is an unsafe fix and may change runtime behavior

TC001 [*] Move application import `.foo` into a type-checking block
  --> TC001_future.py:57:19
   |
56 | def n():
57 |     from . import foo
   |                   ^^^
58 |
59 |     def f(x: Union[foo.Ty, int]): ...
   |
help: Move into type-checking block
   |
52 | # unions
   - from typing import Union
53 + from typing import Union, TYPE_CHECKING
54 +
55 + if TYPE_CHECKING:
56 +     from . import foo
57 |
58 |
59 | def n():
   -     from . import foo
60 |
   |
note: This is an unsafe fix and may change runtime behavior
