We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d205d7 commit 49f2074Copy full SHA for 49f2074
src/array_api_stubs/_draft/_types.py
@@ -33,6 +33,7 @@
33
34
from dataclasses import dataclass
35
from typing import (
36
+ TYPE_CHECKING,
37
Any,
38
List,
39
Literal,
@@ -46,9 +47,14 @@
46
47
)
48
from enum import Enum
49
-array = TypeVar("array")
50
+
51
+if TYPE_CHECKING:
52
+ from .array_object import Array
53
+ from .data_types import DType
54
55
+array = TypeVar("array", bound="Array")
56
device = TypeVar("device")
-dtype = TypeVar("dtype")
57
+dtype = TypeVar("dtype", bound="DType")
58
SupportsDLPack = TypeVar("SupportsDLPack")
59
SupportsBufferProtocol = TypeVar("SupportsBufferProtocol")
60
PyCapsule = TypeVar("PyCapsule")
0 commit comments