---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
TCH005.py:4:5: TCH005 [*] Found empty type-checking block
  |
3 | if TYPE_CHECKING:
4 |     pass  # TCH005
  |     ^^^^ TCH005
  |
  = help: Delete empty type-checking block

ℹ Safe fix
1 1 | from typing import TYPE_CHECKING, List
2 2 | 
3   |-if TYPE_CHECKING:
4   |-    pass  # TCH005
5 3 | 
6 4 | 
7 5 | if False:

TCH005.py:8:5: TCH005 [*] Found empty type-checking block
   |
 7 | if False:
 8 |     pass  # TCH005
   |     ^^^^ TCH005
 9 | 
10 | if 0:
   |
   = help: Delete empty type-checking block

ℹ Safe fix
4 4 |     pass  # TCH005
5 5 | 
6 6 | 
7   |-if False:
8   |-    pass  # TCH005
9 7 | 
10 8 | if 0:
11 9 |     pass  # TCH005

TCH005.py:11:5: TCH005 [*] Found empty type-checking block
   |
10 | if 0:
11 |     pass  # TCH005
   |     ^^^^ TCH005
   |
   = help: Delete empty type-checking block

ℹ Safe fix
7  7  | if False:
8  8  |     pass  # TCH005
9  9  | 
10    |-if 0:
11    |-    pass  # TCH005
12 10 | 
13 11 | 
14 12 | def example():

TCH005.py:16:9: TCH005 [*] Found empty type-checking block
   |
14 | def example():
15 |     if TYPE_CHECKING:
16 |         pass  # TCH005
   |         ^^^^ TCH005
17 |     return
   |
   = help: Delete empty type-checking block

ℹ Safe fix
12 12 | 
13 13 | 
14 14 | def example():
15    |-    if TYPE_CHECKING:
16    |-        pass  # TCH005
17 15 |     return
18 16 | 
19 17 | 

TCH005.py:22:9: TCH005 [*] Found empty type-checking block
   |
20 | class Test:
21 |     if TYPE_CHECKING:
22 |         pass  # TCH005
   |         ^^^^ TCH005
23 |     x = 2
   |
   = help: Delete empty type-checking block

ℹ Safe fix
18 18 | 
19 19 | 
20 20 | class Test:
21    |-    if TYPE_CHECKING:
22    |-        pass  # TCH005
23 21 |     x = 2
24 22 | 
25 23 | 

TCH005.py:45:5: TCH005 [*] Found empty type-checking block
   |
44 | if TYPE_CHECKING:
45 |     pass  # TCH005
   |     ^^^^ TCH005
   |
   = help: Delete empty type-checking block

ℹ Safe fix
41 41 | 
42 42 | from typing_extensions import TYPE_CHECKING
43 43 | 
44    |-if TYPE_CHECKING:
45    |-    pass  # TCH005


