---
source: crates/ruff/src/rules/flake8_type_checking/mod.rs
---
TCH002.py:5:12: TCH002 Move third-party import `pandas` into a type-checking block
  |
5 | def f():
6 |     import pandas as pd  # TCH002
  |            ^^^^^^^^^^^^ TCH002
7 | 
8 |     x: pd.DataFrame
  |

TCH002.py:11:24: TCH002 Move third-party import `pandas.DataFrame` into a type-checking block
   |
11 | def f():
12 |     from pandas import DataFrame  # TCH002
   |                        ^^^^^^^^^ TCH002
13 | 
14 |     x: DataFrame
   |

TCH002.py:17:24: TCH002 Move third-party import `pandas.DataFrame` into a type-checking block
   |
17 | def f():
18 |     from pandas import DataFrame as df  # TCH002
   |                        ^^^^^^^^^^^^^^^ TCH002
19 | 
20 |     x: df
   |

TCH002.py:23:12: TCH002 Move third-party import `pandas` into a type-checking block
   |
23 | def f():
24 |     import pandas as pd  # TCH002
   |            ^^^^^^^^^^^^ TCH002
25 | 
26 |     x: pd.DataFrame = 1
   |

TCH002.py:29:24: TCH002 Move third-party import `pandas.DataFrame` into a type-checking block
   |
29 | def f():
30 |     from pandas import DataFrame  # TCH002
   |                        ^^^^^^^^^ TCH002
31 | 
32 |     x: DataFrame = 2
   |

TCH002.py:35:24: TCH002 Move third-party import `pandas.DataFrame` into a type-checking block
   |
35 | def f():
36 |     from pandas import DataFrame as df  # TCH002
   |                        ^^^^^^^^^^^^^^^ TCH002
37 | 
38 |     x: df = 3
   |

TCH002.py:41:12: TCH002 Move third-party import `pandas` into a type-checking block
   |
41 | def f():
42 |     import pandas as pd  # TCH002
   |            ^^^^^^^^^^^^ TCH002
43 | 
44 |     x: "pd.DataFrame" = 1
   |

TCH002.py:47:12: TCH002 Move third-party import `pandas` into a type-checking block
   |
47 | def f():
48 |     import pandas as pd  # TCH002
   |            ^^^^^^^^^^^^ TCH002
49 | 
50 |     x = dict["pd.DataFrame", "pd.DataFrame"]
   |


