---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
TC004 [*] Move import `datetime.date` out of type-checking block. Import is used for more than type hinting.
 --> TC004_2.py:4:26
  |
3 | if TYPE_CHECKING:
4 |     from datetime import date
  |                          ^^^^
  |
 ::: TC004_2.py:8:12
  |
7 | def example():
8 |     return date()
  |            ---- Used at runtime here
  |
help: Move out of type-checking block
  |
1 | from typing import TYPE_CHECKING
2 + from datetime import date
3 |
4 | if TYPE_CHECKING:
  -     from datetime import date
5 +     pass
6 |
  |
note: This is an unsafe fix and may change runtime behavior
