You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(cuda.core): use PEP 604 unions in docstrings (#2601)
Docstrings across cuda_core still spelled parameter types with the
pre-3.10 typing generics. Replace Union[...] and Optional[...] with the
| form the rest of the package already uses, e.g. `stream : Stream |
None, optional` in _memoryview.pyx.
Docstrings only, so the .pyi changes are the stubgen-pyx output for the
edited .pyx files and no runtime behavior moves. In _module.pyx this also
realigns the max_potential_block_size docstring with its signature, which
already reads int | driver.CUoccupancyB2DSize.
Two code-level spellings stay as they are:
- LinkerHandleT in _linker.pyx is a runtime value, not an annotation.
_program.pyx builds ProgramHandleT from it with `nvrtc.nvrtcProgram |
int | LinkerHandleT`, and PEP 604 `|` on the forward-reference strings
it holds raises TypeError.
- The union_type literal in _process_define_macro is error-message text
rather than a docstring.
Sequence[...] and Iterable[...] elsewhere in cuda_core are
collections.abc generics and are unaffected.
Signed-off-by: Aryan <aryansputta@gmail.com>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
0 commit comments