---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
TC002 [*] Move third-party import `pandas.DataFrame` into a type-checking block
 --> typing_modules_1.py:7:24
  |
6 | def func():
7 |     from pandas import DataFrame
  |                        ^^^^^^^^^
8 |
9 |     df: DataFrame
  |
help: Move into type-checking block
   |
3  | from typing_extensions import Self
4  + from typing import TYPE_CHECKING
5  +
6  + if TYPE_CHECKING:
7  +     from pandas import DataFrame
8  |
9  |
10 | def func():
   -     from pandas import DataFrame
11 |
   |
note: This is an unsafe fix and may change runtime behavior
