Skip to content

Commit fba9163

Browse files
authored
Update cuda_core/AGENTS.md
1 parent b5f6c0e commit fba9163

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

cuda_core/AGENTS.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,7 @@ Python or Cython type annotations should be included for all public APIs. Avoid
125125
the use of `Any` unless absolutely necessary. The argument and return types as
126126
defined in the docstrings should match the type annotations.
127127

128-
The use of `if typing.TYPE_CHECK:` blocks is often necessary to avoid import
129-
cycles. However, this can occasionally mask symbols used by Sphinx to make
130-
cross-references in the docs. If importing an object doesn't create a cycle, it
131-
should be imported outside of an `if typing.TYPE_CHECK:` block, even if it is
132-
only used in type annotations.
128+
Python imports should generally be outside of an if typing.TYPE_CHECK: block, even if the imported object is only used in type annotations. Use if typing.TYPE_CHECK: only to avoid creating import cycles. (This guidance maximizes compatibility with the cross-reference mechanisms in Sphinx.)
133129

134130
### Semantics
135131

0 commit comments

Comments
 (0)