---
source: crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
---
TC003 [*] Move standard library import `collections.Counter` into a type-checking block
 --> TC001-3_future.py:1:25
  |
1 | from collections import Counter
  |                         ^^^^^^^
2 |
3 | from elsewhere import third_party
  |
help: Move into type-checking block
  |
  - from collections import Counter
1 |
2 | from elsewhere import third_party
3 |
4 | from . import first_party
5 + from typing import TYPE_CHECKING
6 +
7 + if TYPE_CHECKING:
8 +     from collections import Counter
9 |
  |
note: This is an unsafe fix and may change runtime behavior

TC002 [*] Move third-party import `elsewhere.third_party` into a type-checking block
 --> TC001-3_future.py:3:23
  |
1 | from collections import Counter
2 |
3 | from elsewhere import third_party
  |                       ^^^^^^^^^^^
4 |
5 | from . import first_party
  |
help: Move into type-checking block
  |
2 |
  - from elsewhere import third_party
3 |
4 | from . import first_party
5 + from typing import TYPE_CHECKING
6 +
7 + if TYPE_CHECKING:
8 +     from elsewhere import third_party
9 |
  |
note: This is an unsafe fix and may change runtime behavior

TC001 [*] Move application import `.first_party` into a type-checking block
 --> TC001-3_future.py:5:15
  |
3 | from elsewhere import third_party
4 |
5 | from . import first_party
  |               ^^^^^^^^^^^
  |
help: Move into type-checking block
  |
4 |
  - from . import first_party
5 + from typing import TYPE_CHECKING
6 +
7 + if TYPE_CHECKING:
8 +     from . import first_party
9 |
  |
note: This is an unsafe fix and may change runtime behavior
