Skip to content

Commit 5780a9b

Browse files
committed
Remove typing exports from numpy/_array_api/_types.py
1 parent 4240314 commit 5780a9b

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

numpy/_array_api/_creation_functions.py

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

33

4-
from typing import TYPE_CHECKING
4+
from typing import TYPE_CHECKING, List, Optional, Tuple, Union
55
if TYPE_CHECKING:
6-
from ._types import (List, Optional, SupportsDLPack,
7-
SupportsBufferProtocol, Tuple, Union, Array, Device,
8-
Dtype)
6+
from ._types import (NestedSequence, SupportsDLPack,
7+
SupportsBufferProtocol, Array, Device, Dtype)
98
from collections.abc import Sequence
109
from ._dtypes import _all_dtypes
1110

numpy/_array_api/_manipulation_functions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
from ._array_object import Array
44

5-
from typing import TYPE_CHECKING
6-
if TYPE_CHECKING:
7-
from ._types import Optional, Tuple, Union
5+
from typing import List, Optional, Tuple, Union
86

97
import numpy as np
108

numpy/_array_api/_types.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
valid for inputs that match the given type annotations.
77
"""
88

9-
__all__ = ['Any', 'List', 'Literal', 'Optional', 'Tuple', 'Union', 'Array',
10-
'Device', 'Dtype', 'SupportsDLPack', 'SupportsBufferProtocol',
11-
'PyCapsule']
9+
__all__ = ['Array', 'Device', 'Dtype', 'SupportsDLPack',
10+
'SupportsBufferProtocol', 'PyCapsule']
1211

13-
from typing import Any, List, Literal, Optional, Tuple, Union, TypeVar
12+
from typing import Any, Sequence, Type, Union
1413

1514
from . import (Array, int8, int16, int32, int64, uint8, uint16, uint32,
1615
uint64, float32, float64)

0 commit comments

Comments
 (0)