Sometimes imports are used only for type checking. Python recommends placing these imports under a if TYPE_CHECKING condition: https://docs.python.org/3/library/typing.html#typing.TYPE_CHECKING, which can be used to reduce the cost of imports during runtime or to break circular dependencies. Is it possible to have an option to exclude these imports?
Sometimes imports are used only for type checking. Python recommends placing these imports under a
if TYPE_CHECKINGcondition: https://docs.python.org/3/library/typing.html#typing.TYPE_CHECKING, which can be used to reduce the cost of imports during runtime or to break circular dependencies. Is it possible to have an option to exclude these imports?