Skip to content

Commit 90c3aec

Browse files
committed
don't cast device to Any
1 parent 2a187a2 commit 90c3aec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array_api_extra/_lib/_utils/_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def capabilities(xp: ModuleType, *, device: Device | None = None) -> dict[str, i
332332
if is_torch_namespace(xp):
333333
# FIXME https://github.com/data-apis/array-api/issues/945
334334
device = xp.get_default_device() if device is None else xp.device(device)
335-
if cast(Any, device).type == "meta": # type: ignore[explicit-any]
335+
if device.type == "meta": # type: ignore[union-attr] # pyright: ignore[reportAttributeAccessIssue,reportOptionalMemberAccess]
336336
out = out.copy()
337337
out["boolean indexing"] = False
338338
out["data-dependent shapes"] = False

0 commit comments

Comments
 (0)