Skip to content

Commit 56c9165

Browse files
authored
Apply suggestions from code review
Co-authored-by: Lucas Colley <lucas.colley8@gmail.com> Signed-off-by: Lucas Colley <lucas.colley8@gmail.com>
1 parent a53c176 commit 56c9165

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/array_api_typing/_array.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
from typing_extensions import TypeVar
1616

1717
NamespaceT_co = TypeVar("NamespaceT_co", covariant=True, default=ModuleType)
18-
DTypeT_co = TypeVar("DTypeT_co", covariant=True)
19-
DeviceT_co = TypeVar("DeviceT_co", covariant=True, default=object)
18+
DTypeT_co = TypeVar("DTypeT_co", covariant=True)
19+
# TODO: why does this have `default=object` but `DTypeT_co` doesn't?
20+
DeviceT_co = TypeVar("DeviceT_co", covariant=True, default=object)
2021

2122

2223
class HasArrayNamespace(Protocol[NamespaceT_co]):

tests/integration/test_numpy1p0.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ _: xpt.HasShape = nparr_i32
6868
_: xpt.HasShape = nparr_f32
6969

7070
# =========================================================
71-
# `xpt.HasShape`
71+
# `xpt.HasSize`
7272

73-
_: xpt.HasShape = nparr
74-
_: xpt.HasShape = nparr_i32
75-
_: xpt.HasShape = nparr_f32
73+
_: xpt.HasSize = nparr
74+
_: xpt.HasSize = nparr_i32
75+
_: xpt.HasSize = nparr_f32
7676

7777
# =========================================================
7878
# `xpt.HasTranspose`

0 commit comments

Comments
 (0)