Skip to content

Commit 68122b4

Browse files
committed
MAINT: cleanup unused Python3.8-only code and references
Original NumPy Commit: e570c6f5ff6f5aa966193d51560d3cde30fc09bd
1 parent ad46b12 commit 68122b4

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

array_api_strict/_typing.py

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@
1717
"PyCapsule",
1818
]
1919

20-
import sys
2120
from typing import (
2221
Any,
2322
Literal,
2423
Sequence,
2524
Type,
2625
Union,
27-
TYPE_CHECKING,
2826
TypeVar,
2927
Protocol,
3028
)
@@ -51,21 +49,20 @@ def __getitem__(self, key: int, /) -> _T_co | NestedSequence[_T_co]: ...
5149
def __len__(self, /) -> int: ...
5250

5351
Device = Literal["cpu"]
54-
if TYPE_CHECKING or sys.version_info >= (3, 9):
55-
Dtype = dtype[Union[
56-
int8,
57-
int16,
58-
int32,
59-
int64,
60-
uint8,
61-
uint16,
62-
uint32,
63-
uint64,
64-
float32,
65-
float64,
66-
]]
67-
else:
68-
Dtype = dtype
52+
53+
Dtype = dtype[Union[
54+
int8,
55+
int16,
56+
int32,
57+
int64,
58+
uint8,
59+
uint16,
60+
uint32,
61+
uint64,
62+
float32,
63+
float64,
64+
]]
65+
6966

7067
SupportsBufferProtocol = Any
7168
PyCapsule = Any

0 commit comments

Comments
 (0)