Skip to content

Commit 295df1a

Browse files
MAINT: Apply ruff rule RUF020
RUF020 `NoReturn | T` is equivalent to `T`
1 parent 639bc2d commit 295df1a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

numpy/__init__.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,13 +3387,13 @@ class ufunc:
33873387
# raise a ValueError ufuncs with that don't accept two input
33883388
# arguments and return one output argument. Because of that we
33893389
# can't type them very precisely.
3390-
def reduce(self, /, *args: Any, **kwargs: Any) -> NoReturn | Any: ...
3391-
def accumulate(self, /, *args: Any, **kwargs: Any) -> NoReturn | NDArray[Any]: ...
3392-
def reduceat(self, /, *args: Any, **kwargs: Any) -> NoReturn | NDArray[Any]: ...
3393-
def outer(self, *args: Any, **kwargs: Any) -> NoReturn | Any: ...
3390+
def reduce(self, /, *args: Any, **kwargs: Any) -> Any: ...
3391+
def accumulate(self, /, *args: Any, **kwargs: Any) -> NDArray[Any]: ...
3392+
def reduceat(self, /, *args: Any, **kwargs: Any) -> NDArray[Any]: ...
3393+
def outer(self, *args: Any, **kwargs: Any) -> Any: ...
33943394
# Similarly at won't be defined for ufuncs that return multiple
33953395
# outputs, so we can't type it very precisely.
3396-
def at(self, /, *args: Any, **kwargs: Any) -> NoReturn | None: ...
3396+
def at(self, /, *args: Any, **kwargs: Any) -> None: ...
33973397

33983398
# Parameters: `__name__`, `ntypes` and `identity`
33993399
absolute: _UFunc_Nin1_Nout1[L['absolute'], L[20], None]

0 commit comments

Comments
 (0)