Skip to content

Commit 99bd4fd

Browse files
committed
Move signature types to a subpackage
1 parent d9e9454 commit 99bd4fd

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

src/array_api_typing/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
"DType",
77
"Device",
88
"HasArrayNamespace",
9-
"NestedSequence",
10-
"SupportsBufferProtocol",
119
"__version__",
1210
"__version_tuple__",
11+
"signature_types",
1312
]
1413

14+
from . import signature_types
1515
from ._array import Array
1616
from ._device import Device
1717
from ._dtype import DType
1818
from ._namespace import ArrayNamespace, HasArrayNamespace
19-
from ._simple import NestedSequence, SupportsBufferProtocol
2019
from ._version import version as __version__, version_tuple as __version_tuple__

src/array_api_typing/_namespace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ._array import Array
77
from ._device import Device
88
from ._dtype import DType
9-
from ._simple import NestedSequence, SupportsBufferProtocol
9+
from .signature_types import NestedSequence, SupportsBufferProtocol
1010

1111
A = TypeVar("A", bound=Array, default=Array) # PEP 696 default
1212

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"""Types that appear in public function signatures."""
2+
3+
__all__ = [
4+
"NestedSequence",
5+
"SupportsBufferProtocol",
6+
]
7+
8+
from ._signature_types import NestedSequence, SupportsBufferProtocol

src/array_api_typing/_simple.py renamed to src/array_api_typing/signature_types/_signature_types.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"""Static typing support for the array API standard."""
2-
31
from __future__ import annotations
42

53
from typing import Any, Protocol, TypeAlias, TypeVar

0 commit comments

Comments
 (0)