---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
<filename>:6:8: TCH003 [*] Move standard library import `os` into a type-checking block
  |
4 | from typing import TYPE_CHECKING
5 | 
6 | import os, pandas
  |        ^^ TCH003
7 | 
8 | def f(x: os, y: pandas):
  |
  = help: Move into type-checking block

ℹ Unsafe fix
3  3  | 
4  4  | from typing import TYPE_CHECKING
5  5  | 
6     |-import os, pandas
   6  |+import pandas
   7  |+
   8  |+if TYPE_CHECKING:
   9  |+    import os
7  10 | 
8  11 | def f(x: os, y: pandas):
9  12 |     pass

<filename>:6:12: TCH002 [*] Move third-party import `pandas` into a type-checking block
  |
4 | from typing import TYPE_CHECKING
5 | 
6 | import os, pandas
  |            ^^^^^^ TCH002
7 | 
8 | def f(x: os, y: pandas):
  |
  = help: Move into type-checking block

ℹ Unsafe fix
3  3  | 
4  4  | from typing import TYPE_CHECKING
5  5  | 
6     |-import os, pandas
   6  |+import os
   7  |+
   8  |+if TYPE_CHECKING:
   9  |+    import pandas
7  10 | 
8  11 | def f(x: os, y: pandas):
9  12 |     pass


