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/fft | |
parent | 99ed44df750fedfc0bbf956c88d15befd5e760cd (diff) | |
download | numpy-7b5f39b5eeac583f822741eaf95a8229f2b5f8d7.tar.gz |
STY: Use subscriptable `builtins` types over the generic aliases in `typing`
Diffstat (limited to 'numpy/fft')
-rw-r--r-- | numpy/fft/__init__.pyi | 6 | ||||
-rw-r--r-- | numpy/fft/_pocketfft.pyi | 3 | ||||
-rw-r--r-- | numpy/fft/helper.pyi | 4 |
3 files changed, 5 insertions, 8 deletions
diff --git a/numpy/fft/__init__.pyi b/numpy/fft/__init__.pyi index 510e576d3..5518aac16 100644 --- a/numpy/fft/__init__.pyi +++ b/numpy/fft/__init__.pyi @@ -1,5 +1,3 @@ -from typing import Any, List - from numpy._pytesttester import PytestTester from numpy.fft._pocketfft import ( @@ -26,6 +24,6 @@ from numpy.fft.helper import ( rfftfreq as rfftfreq, ) -__all__: List[str] -__path__: List[str] +__all__: list[str] +__path__: list[str] test: PytestTester diff --git a/numpy/fft/_pocketfft.pyi b/numpy/fft/_pocketfft.pyi index 86cf6a60d..a04fff402 100644 --- a/numpy/fft/_pocketfft.pyi +++ b/numpy/fft/_pocketfft.pyi @@ -1,6 +1,5 @@ from typing import ( Literal as L, - List, Sequence, ) @@ -9,7 +8,7 @@ from numpy.typing import ArrayLike, NDArray, _ArrayLikeNumber_co _NormKind = L[None, "backward", "ortho", "forward"] -__all__: List[str] +__all__: list[str] def fft( a: ArrayLike, diff --git a/numpy/fft/helper.pyi b/numpy/fft/helper.pyi index d75826f4e..a7f3bdf51 100644 --- a/numpy/fft/helper.pyi +++ b/numpy/fft/helper.pyi @@ -1,4 +1,4 @@ -from typing import List, Any, TypeVar, overload +from typing import Any, TypeVar, overload from numpy import generic, dtype, integer, floating, complexfloating from numpy.typing import ( @@ -15,7 +15,7 @@ _SCT = TypeVar("_SCT", bound=generic) _ArrayLike = _FiniteNestedSequence[_SupportsArray[dtype[_SCT]]] -__all__: List[str] +__all__: list[str] @overload def fftshift(x: _ArrayLike[_SCT], axes: None | _ShapeLike = ...) -> NDArray[_SCT]: ... |