---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
TCH001.py:20:19: TCH001 [*] Move application import `.TYP001` into a type-checking block
   |
19 | def f():
20 |     from . import TYP001
   |                   ^^^^^^ TCH001
21 | 
22 |     x: TYP001
   |
   = help: Move into type-checking block

ℹ Unsafe fix
2  2  | 
3  3  | For typing-only import detection tests, see `TCH002.py`.
4  4  | """
   5  |+from typing import TYPE_CHECKING
   6  |+
   7  |+if TYPE_CHECKING:
   8  |+    from . import TYP001
5  9  | 
6  10 | 
7  11 | def f():
--------------------------------------------------------------------------------
17 21 | 
18 22 | 
19 23 | def f():
20    |-    from . import TYP001
21 24 | 
22 25 |     x: TYP001
23 26 | 


