mypy
mypy copied to clipboard
Warn that annotations could be if TYPE_CHECKING
Would it be possible to get mypy to list all imports that are only used for annotations that are not in an if TYPE_CHECKING check?
It would be very useful to cleanup imports and head off potential circular import issues coming from annotation imports.
FWIW, this feature is currently provided by ruff's TCH rules / flake8-type-checking