Skip to content

Commit e5f23e6

Browse files
committed
fixup! feat(core.utils): drop obsolete TypeError fallback; restore __dir__ module attrs
1 parent c68d0cc commit e5f23e6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

cuda_core/cuda/core/utils/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ def __getattr__(name):
4040

4141

4242
def __dir__():
43-
return sorted(__all__)
43+
# Merge the lazy public API with the real module namespace so REPL and
44+
# introspection tools still surface ``__file__``, ``__spec__``, etc.
45+
return sorted(set(globals()) | set(__all__))

cuda_core/cuda/core/utils/_program_cache.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,10 +614,7 @@ def make_program_cache_key(
614614
if backend == "linker":
615615
option_bytes = _linker_option_fingerprint(options, use_driver_linker=use_driver_linker)
616616
else:
617-
try:
618-
option_bytes = options.as_bytes(backend, target_type)
619-
except TypeError:
620-
option_bytes = options.as_bytes(backend)
617+
option_bytes = options.as_bytes(backend, target_type)
621618

622619
# Preserve the original type of each name expression in the key: though
623620
# ``name_expressions`` is only consumed (and only meaningful) on the

0 commit comments

Comments
 (0)