---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
TC003 [*] Move standard library import `dataclasses.FrozenInstanceError` into a type-checking block
 --> init_var.py:5:25
  |
3 | from __future__ import annotations
4 |
5 | from dataclasses import FrozenInstanceError, InitVar, dataclass
  |                         ^^^^^^^^^^^^^^^^^^^
6 | from pathlib import Path
  |
help: Move into type-checking block
   |
4  |
   - from dataclasses import FrozenInstanceError, InitVar, dataclass
5  + from dataclasses import InitVar, dataclass
6  | from pathlib import Path
7  + from typing import TYPE_CHECKING
8  +
9  + if TYPE_CHECKING:
10 +     from dataclasses import FrozenInstanceError
11 |
   |
note: This is an unsafe fix and may change runtime behavior

TC003 [*] Move standard library import `pathlib.Path` into a type-checking block
 --> init_var.py:6:21
  |
5 | from dataclasses import FrozenInstanceError, InitVar, dataclass
6 | from pathlib import Path
  |                     ^^^^
  |
help: Move into type-checking block
   |
5  | from dataclasses import FrozenInstanceError, InitVar, dataclass
   - from pathlib import Path
6  + from typing import TYPE_CHECKING
7  +
8  + if TYPE_CHECKING:
9  +     from pathlib import Path
10 |
   |
note: This is an unsafe fix and may change runtime behavior
