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

ℹ Suggested 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
   |
 8 | if False:
 9 |     pass  # TCH005
   |     ^^^^ TCH005
10 | 
11 | if 0:
   |
   = help: Delete empty type-checking block

ℹ Suggested 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
   |
11 | if 0:
12 |     pass  # TCH005
   |     ^^^^ TCH005
   |
   = help: Delete empty type-checking block

ℹ Suggested 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
   |
16 | def example():
17 |     if TYPE_CHECKING:
18 |         pass  # TCH005
   |         ^^^^ TCH005
19 |     return
   |
   = help: Delete empty type-checking block

ℹ Suggested 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
   |
22 | class Test:
23 |     if TYPE_CHECKING:
24 |         pass  # TCH005
   |         ^^^^ TCH005
25 |     x = 2
   |
   = help: Delete empty type-checking block

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


