Skip to content

Commit 01a5932

Browse files
committed
CI fixes
1 parent 7dbe0df commit 01a5932

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/test-vendor.yml

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
uses: prefix-dev/[email protected]
4747
with:
4848
pixi-version: v0.39.0
49+
manifest-path: array-api-extra/pyproject.toml
4950
cache: true
5051

5152
- name: Test package

src/array_api_extra/_lib/_compat.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
from __future__ import annotations
44

55
try:
6-
from ..._array_api_compat_vendor import array_namespace, device
6+
from ..._array_api_compat_vendor import ( # pyright: ignore[reportMissingImports]
7+
array_namespace, # pyright: ignore[reportUnknownVariableType]
8+
device, # pyright: ignore[reportUnknownVariableType]
9+
)
710
except ImportError:
8-
from array_api_compat import array_namespace, device
11+
from array_api_compat import ( # pyright: ignore[reportMissingTypeStubs]
12+
array_namespace, # pyright: ignore[reportUnknownVariableType]
13+
device,
14+
)
915

1016
__all__ = [
1117
"array_namespace",

src/array_api_extra/_lib/_compat.pyi

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from types import ModuleType
2+
from ._typing import Array, Device
3+
4+
class ArrayModule(ModuleType):
5+
def device(self, x: Array, /) -> Device: ...
6+
7+
def array_namespace(
8+
*xs: Array,
9+
api_version: str | None = None,
10+
use_compat: bool | None =None,
11+
) -> ArrayModule: ...
12+
13+
def device(x: Array, /) -> Device: ...

0 commit comments

Comments
 (0)