A flake8 plugin for managing type-checking imports and forward references. Current version 3.2.0, requires Python >=3.10. Released irregularly with multiple minor versions per year.
pip install flake8-type-checkingVerified import paths — ran on the pinned version, not inferred.
Basic usage: install and configure flake8, then add ignore or error codes as needed. The plugin automatically detects TYPE_CHECKING blocks.
Add `type-checking-typing-modules = mymodule.typing` to your flake8 config, where `mymodule.typing` is the module that re-exports.
Always import TYPE_CHECKING from typing, not from other modules.
Upgrade to Python 3.10 or later.
Use `from __future__ import annotations` or convert string annotations to actual type hints, or disable TC010 with `extend-ignore = TC010`.