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