Avoid relying on typing.TYPE_CHECKING
to the maximum possible extent
#468
Labels
cuda.core
Everything related to the cuda.core module
documentation
Improvements or additions to documentation
enhancement
Any code-related improvements
P1
Medium priority - Should do
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.The text was updated successfully, but these errors were encountered: