Skip to content

Commit fc8e0c0

Browse files
Fix cython-lint warnings in _linker.pyx
Remove unused cimports (CuLinkHandle, NvJitLinkHandle already declared in .pxd) and use __import__ for the availability check to avoid an unused-import lint error. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent efd6a2f commit fc8e0c0

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎cuda_core/cuda/core/_linker.pyx‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ from cuda.bindings cimport cydriver
1717
from cuda.bindings cimport cynvjitlink
1818

1919
from ._resource_handles cimport (
20-
CuLinkHandle,
21-
NvJitLinkHandle,
2220
as_cu,
2321
as_py,
2422
create_culink_handle,
@@ -652,7 +650,7 @@ def _decide_nvjitlink_or_driver() -> bool:
652650
)
653651

654652
try:
655-
import cuda.bindings.nvjitlink # noqa: F401 (availability check)
653+
__import__("cuda.bindings.nvjitlink") # availability check
656654
except ModuleNotFoundError:
657655
warn_txt = f"cuda.bindings.nvjitlink is not available, therefore {warn_txt_common} cuda-bindings."
658656
else:

0 commit comments

Comments
 (0)