Skip to content

Commit 45c006e

Browse files
committed
address review comments
1 parent fd7a2b7 commit 45c006e

File tree

4 files changed

+44
-19
lines changed

4 files changed

+44
-19
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
run: |
3939
pixi run -e lint pylint
4040
pixi run -e lint mypy
41+
pixi run -e lint pyright
4142
4243
checks:
4344
name: Check ${{ matrix.environment }}

pixi.lock

Lines changed: 38 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ numpy = "*"
7777
pytest = "*"
7878

7979
[tool.pixi.feature.lint.pypi-dependencies]
80-
basedmypy = "*"
80+
basedmypy = { version = "*", extras = ["faster-cache"] }
8181
basedpyright = "*"
8282

8383
[tool.pixi.feature.lint.tasks]

tests/test_funcs.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

33
import contextlib
4+
import typing
45
import warnings
5-
from typing import TYPE_CHECKING, Any
66

77
# array-api-strict#6
88
import array_api_strict as xp # type: ignore[import-untyped]
@@ -12,9 +12,8 @@
1212

1313
from array_api_extra import atleast_nd, cov, create_diagonal, expand_dims, kron, sinc
1414

15-
if TYPE_CHECKING:
16-
# To be changed to a Protocol later (see data-apis/array-api#589)
17-
Array = Any # type: ignore[no-any-explicit]
15+
if typing.TYPE_CHECKING:
16+
from array_api_extra._typing import Array
1817

1918

2019
class TestAtLeastND:
@@ -198,7 +197,7 @@ def test_kron_smoke(self):
198197
((2, 0, 0, 2), (2, 0, 2)),
199198
],
200199
)
201-
def test_kron_shape(self, shape_a: tuple[int], shape_b: tuple[int]):
200+
def test_kron_shape(self, shape_a: tuple[int, ...], shape_b: tuple[int, ...]):
202201
a = xp.ones(shape_a)
203202
b = xp.ones(shape_b)
204203
normalised_shape_a = xp.asarray(

0 commit comments

Comments
 (0)