Skip to content

Commit c7bca4b

Browse files
committed
raise error on invalid backend property
1 parent 255591f commit c7bca4b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arrayfire_wrapper/_backend.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,10 @@ def _find_nvrtc_builtins_lib_name(self, search_path: Path) -> str | None:
296296
return None
297297

298298
@property
299-
def backend_type(self) -> BackendType | None:
300-
return self._backend_type
299+
def backend_type(self) -> BackendType:
300+
if self._backend_type:
301+
return self._backend_type
302+
raise RuntimeError("No valid _backend_type")
301303

302304
@property
303305
def clib(self) -> ctypes.CDLL:

0 commit comments

Comments
 (0)