diff options
author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-12-21 20:24:22 +0100 |
---|---|---|
committer | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-12-23 21:15:00 +0100 |
commit | 7b5f39b5eeac583f822741eaf95a8229f2b5f8d7 (patch) | |
tree | a7a83a47f39d1e4e29becb5f835158e4b1c86e3a /numpy/core/shape_base.pyi | |
parent | 99ed44df750fedfc0bbf956c88d15befd5e760cd (diff) | |
download | numpy-7b5f39b5eeac583f822741eaf95a8229f2b5f8d7.tar.gz |
STY: Use subscriptable `builtins` types over the generic aliases in `typing`
Diffstat (limited to 'numpy/core/shape_base.pyi')
-rw-r--r-- | numpy/core/shape_base.pyi | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/core/shape_base.pyi b/numpy/core/shape_base.pyi index 159ad2781..f0f0f6f56 100644 --- a/numpy/core/shape_base.pyi +++ b/numpy/core/shape_base.pyi @@ -1,4 +1,4 @@ -from typing import TypeVar, overload, List, Sequence, Any, SupportsIndex +from typing import TypeVar, overload, Sequence, Any, SupportsIndex from numpy import generic, dtype from numpy.typing import ArrayLike, NDArray, _FiniteNestedSequence, _SupportsArray @@ -8,28 +8,28 @@ _ArrayType = TypeVar("_ArrayType", bound=NDArray[Any]) _ArrayLike = _FiniteNestedSequence[_SupportsArray[dtype[_SCT]]] -__all__: List[str] +__all__: list[str] @overload def atleast_1d(arys: _ArrayLike[_SCT], /) -> NDArray[_SCT]: ... @overload def atleast_1d(arys: ArrayLike, /) -> NDArray[Any]: ... @overload -def atleast_1d(*arys: ArrayLike) -> List[NDArray[Any]]: ... +def atleast_1d(*arys: ArrayLike) -> list[NDArray[Any]]: ... @overload def atleast_2d(arys: _ArrayLike[_SCT], /) -> NDArray[_SCT]: ... @overload def atleast_2d(arys: ArrayLike, /) -> NDArray[Any]: ... @overload -def atleast_2d(*arys: ArrayLike) -> List[NDArray[Any]]: ... +def atleast_2d(*arys: ArrayLike) -> list[NDArray[Any]]: ... @overload def atleast_3d(arys: _ArrayLike[_SCT], /) -> NDArray[_SCT]: ... @overload def atleast_3d(arys: ArrayLike, /) -> NDArray[Any]: ... @overload -def atleast_3d(*arys: ArrayLike) -> List[NDArray[Any]]: ... +def atleast_3d(*arys: ArrayLike) -> list[NDArray[Any]]: ... @overload def vstack(tup: Sequence[_ArrayLike[_SCT]]) -> NDArray[_SCT]: ... |