diff options
author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-12-21 17:23:24 +0100 |
---|---|---|
committer | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-12-22 00:08:15 +0100 |
commit | 99ed44df750fedfc0bbf956c88d15befd5e760cd (patch) | |
tree | 78820b19ae6c0fe62065f87c567066fa112a4aaf /numpy/lib/utils.pyi | |
parent | 08053b2600f4b93575d8057238861219a1a57edc (diff) | |
download | numpy-99ed44df750fedfc0bbf956c88d15befd5e760cd.tar.gz |
STY: Replace `Union` with the `|` operator
Diffstat (limited to 'numpy/lib/utils.pyi')
-rw-r--r-- | numpy/lib/utils.pyi | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/lib/utils.pyi b/numpy/lib/utils.pyi index f42ba9efb..ef4f8cd4a 100644 --- a/numpy/lib/utils.pyi +++ b/numpy/lib/utils.pyi @@ -8,7 +8,6 @@ from typing import ( Sequence, Tuple, TypeVar, - Union, Protocol, ) @@ -67,7 +66,7 @@ def deprecate_with_doc(msg: None | str) -> _Deprecate: ... # implementing the `__array_interface__` protocol. The caveat is # that certain keys, marked as optional in the spec, must be present for # `byte_bounds`. This concerns `"strides"` and `"data"`. -def byte_bounds(a: Union[generic, ndarray[Any, Any]]) -> Tuple[int, int]: ... +def byte_bounds(a: generic | ndarray[Any, Any]) -> Tuple[int, int]: ... def who(vardict: None | Mapping[str, ndarray[Any, Any]] = ...) -> None: ... @@ -85,10 +84,10 @@ def source( def lookfor( what: str, - module: Union[None, str, Sequence[str]] = ..., + module: None | str | Sequence[str] = ..., import_modules: bool = ..., regenerate: bool = ..., output: None | _SupportsWrite[str] =..., ) -> None: ... -def safe_eval(source: Union[str, AST]) -> Any: ... +def safe_eval(source: str | AST) -> Any: ... |