Skip to content

Commit 1a5639f

Browse files
authored
Use *E aliases, where possible (#1895)
1 parent 9255cab commit 1a5639f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

returns/future.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ def future_safe(
14701470
Coroutine[_FirstType, _SecondType, _ValueType],
14711471
],
14721472
/,
1473-
) -> Callable[_FuncParams, FutureResult[_ValueType, Exception]]:
1473+
) -> Callable[_FuncParams, FutureResultE[_ValueType]]:
14741474
"""Decorator to convert exception-throwing for any kind of Exception."""
14751475

14761476

@@ -1498,7 +1498,7 @@ def future_safe( # noqa: C901, WPS212, WPS234,
14981498
Tuple[Type[_ExceptionType], ...],
14991499
],
15001500
) -> Union[
1501-
Callable[_FuncParams, FutureResult[_ValueType, Exception]],
1501+
Callable[_FuncParams, FutureResultE[_ValueType]],
15021502
Callable[
15031503
[
15041504
Callable[

returns/io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ def lash(self, function):
895895
def impure_safe(
896896
function: Callable[_FuncParams, _NewValueType],
897897
/,
898-
) -> Callable[_FuncParams, IOResult[_NewValueType, Exception]]:
898+
) -> Callable[_FuncParams, IOResultE[_NewValueType]]:
899899
"""Decorator to convert exception-throwing for any kind of Exception."""
900900

901901

@@ -915,7 +915,7 @@ def impure_safe( # noqa: WPS234, C901
915915
Tuple[Type[_ExceptionType], ...],
916916
],
917917
) -> Union[
918-
Callable[_FuncParams, IOResult[_NewValueType, Exception]],
918+
Callable[_FuncParams, IOResultE[_NewValueType]],
919919
Callable[
920920
[Callable[_FuncParams, _NewValueType]],
921921
Callable[_FuncParams, IOResult[_NewValueType, _ExceptionType]],

returns/result.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def failure(self) -> Never:
481481
def safe(
482482
function: Callable[_FuncParams, _ValueType],
483483
/,
484-
) -> Callable[_FuncParams, Result[_ValueType, Exception]]:
484+
) -> Callable[_FuncParams, ResultE[_ValueType]]:
485485
"""Decorator to convert exception-throwing for any kind of Exception."""
486486

487487

@@ -501,7 +501,7 @@ def safe( # noqa: WPS234, C901
501501
Tuple[Type[_ExceptionType], ...],
502502
],
503503
) -> Union[
504-
Callable[_FuncParams, Result[_ValueType, Exception]],
504+
Callable[_FuncParams, ResultE[_ValueType]],
505505
Callable[
506506
[Callable[_FuncParams, _ValueType]],
507507
Callable[_FuncParams, Result[_ValueType, _ExceptionType]],

0 commit comments

Comments
 (0)