summaryrefslogtreecommitdiff
path: root/numpy/lib/arrayterator.pyi
diff options
context:
space:
mode:
authorBas van Beek <43369155+BvB93@users.noreply.github.com>2021-12-21 20:24:22 +0100
committerBas van Beek <43369155+BvB93@users.noreply.github.com>2021-12-23 21:15:00 +0100
commit7b5f39b5eeac583f822741eaf95a8229f2b5f8d7 (patch)
treea7a83a47f39d1e4e29becb5f835158e4b1c86e3a /numpy/lib/arrayterator.pyi
parent99ed44df750fedfc0bbf956c88d15befd5e760cd (diff)
downloadnumpy-7b5f39b5eeac583f822741eaf95a8229f2b5f8d7.tar.gz
STY: Use subscriptable `builtins` types over the generic aliases in `typing`
Diffstat (limited to 'numpy/lib/arrayterator.pyi')
-rw-r--r--numpy/lib/arrayterator.pyi15
1 files changed, 6 insertions, 9 deletions
diff --git a/numpy/lib/arrayterator.pyi b/numpy/lib/arrayterator.pyi
index 82c669206..71fc1b6d7 100644
--- a/numpy/lib/arrayterator.pyi
+++ b/numpy/lib/arrayterator.pyi
@@ -1,11 +1,8 @@
from typing import (
- List,
Any,
TypeVar,
Generator,
- List,
Union,
- Tuple,
overload,
)
@@ -19,10 +16,10 @@ _ScalarType = TypeVar("_ScalarType", bound=generic)
_Index = Union[
Union[ellipsis, int, slice],
- Tuple[Union[ellipsis, int, slice], ...],
+ tuple[Union[ellipsis, int, slice], ...],
]
-__all__: List[str]
+__all__: list[str]
# NOTE: In reality `Arrayterator` does not actually inherit from `ndarray`,
# but its ``__getattr__` method does wrap around the former and thus has
@@ -31,12 +28,12 @@ __all__: List[str]
class Arrayterator(ndarray[_Shape, _DType]):
var: ndarray[_Shape, _DType] # type: ignore[assignment]
buf_size: None | int
- start: List[int]
- stop: List[int]
- step: List[int]
+ start: list[int]
+ stop: list[int]
+ step: list[int]
@property # type: ignore[misc]
- def shape(self) -> Tuple[int, ...]: ...
+ def shape(self) -> tuple[int, ...]: ...
@property
def flat( # type: ignore[override]
self: ndarray[Any, dtype[_ScalarType]]