---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
TC002 [*] Move third-party import `pandas` into a type-checking block
 --> <filename>:4:18
  |
2 | from __future__ import annotations
3 |
4 | import pandas as pd
  |                  ^^
5 |
6 | def f(x: pd.DataFrame):
  |
help: Move into type-checking block
  |
3 |
  - import pandas as pd
4 + from typing import TYPE_CHECKING
5 +
6 + if TYPE_CHECKING:
7 +     import pandas as pd
8 |
  |
note: This is an unsafe fix and may change runtime behavior
