mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-06 18:07:39 +08:00
[redis] Improve fail parameter of Retry.call_with_retry (#8827)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from collections.abc import Awaitable, Callable, Iterable
|
||||
from typing import Any, TypeVar
|
||||
from typing import TypeVar
|
||||
|
||||
from redis.backoff import AbstractBackoff
|
||||
from redis.exceptions import RedisError
|
||||
@@ -9,4 +9,4 @@ _T = TypeVar("_T")
|
||||
class Retry:
|
||||
def __init__(self, backoff: AbstractBackoff, retries: int, supported_errors: tuple[type[RedisError], ...] = ...) -> None: ...
|
||||
def update_supported_errors(self, specified_errors: Iterable[type[RedisError]]) -> None: ...
|
||||
async def call_with_retry(self, do: Callable[[], Awaitable[_T]], fail: Callable[[RedisError], Any]) -> _T: ...
|
||||
async def call_with_retry(self, do: Callable[[], Awaitable[_T]], fail: Callable[[RedisError], Awaitable[object]]) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user