Skip to content

Avoid relying on typing.TYPE_CHECKING to the maximum possible extent #468

Open
@leofang

Description

@leofang

During investigation of #454 and related doc rendering issues, it has come to my attention that the type checking detection logic does not work well with Sphinx (ex: sphinx-doc/sphinx#13137, sphinx-doc/sphinx#11225).

Independently, Ralf has pointed out that it makes code debugging harder (#463 (comment)).

The idea of having a if TYPE_CHECKING: check is to avoid unnecessary imports or circular imports. If such issues do not exist, we should avoid using it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium priority - Should docuda.coreEverything related to the cuda.core moduledocumentationImprovements or additions to documentationenhancementAny code-related improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions