Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
leofang opened this issue Feb 24, 2025 · 0 comments
Open
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

Comments

@leofang
Copy link
Member

leofang commented Feb 24, 2025

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.

@leofang leofang added 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 labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant