---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
runtime_evaluated_base_classes_2.py:3:21: TCH002 [*] Move third-party import `geopandas` into a type-checking block
  |
1 | from __future__ import annotations
2 | 
3 | import geopandas as gpd  # TCH002
  |                     ^^^ TCH002
4 | import pydantic
5 | import pyproj  # TCH002
  |
  = help: Move into type-checking block

ℹ Unsafe fix
1  1  | from __future__ import annotations
2  2  | 
3     |-import geopandas as gpd  # TCH002
4  3  | import pydantic
5  4  | import pyproj  # TCH002
6  5  | from pydantic import BaseModel
7  6  | 
8  7  | import numpy
   8  |+from typing import TYPE_CHECKING
   9  |+
   10 |+if TYPE_CHECKING:
   11 |+    import geopandas as gpd
9  12 | 
10 13 | 
11 14 | class A(BaseModel):

runtime_evaluated_base_classes_2.py:5:8: TCH002 [*] Move third-party import `pyproj` into a type-checking block
  |
3 | import geopandas as gpd  # TCH002
4 | import pydantic
5 | import pyproj  # TCH002
  |        ^^^^^^ TCH002
6 | from pydantic import BaseModel
  |
  = help: Move into type-checking block

ℹ Unsafe fix
2  2  | 
3  3  | import geopandas as gpd  # TCH002
4  4  | import pydantic
5     |-import pyproj  # TCH002
6  5  | from pydantic import BaseModel
7  6  | 
8  7  | import numpy
   8  |+from typing import TYPE_CHECKING
   9  |+
   10 |+if TYPE_CHECKING:
   11 |+    import pyproj
9  12 | 
10 13 | 
11 14 | class A(BaseModel):


