File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
"""Static typing support for the array API standard."""
2
2
3
- from typing import Protocol
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING , Protocol
4
6
from typing_extensions import TypeVar
5
7
6
- from ._array import Array
7
- from ._device import Device
8
- from ._dtype import DType
9
- from .signature_types import NestedSequence , SupportsBufferProtocol
8
+ if TYPE_CHECKING :
9
+ from ._array import Array
10
+ from ._device import Device
11
+ from ._dtype import DType
12
+ from .signature_types import NestedSequence , SupportsBufferProtocol
10
13
11
- A = TypeVar ("A" , bound = Array , default = Array ) # PEP 696 default
14
+ A = TypeVar ("A" , bound = Array , default = Array ) # PEP 696 default
15
+ else :
16
+ A = TypeVar ("A" )
12
17
13
18
14
19
class ArrayNamespace (Protocol [A ]):
You can’t perform that action at this time.
0 commit comments