mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-06 18:07:39 +08:00
Improve redis.retry types (#8354)
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
from collections.abc import Iterable
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import TypeVar
|
||||
|
||||
from redis.backoff import AbstractBackoff
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class Retry:
|
||||
def __init__(self, backoff, retries, supported_errors=...) -> None: ...
|
||||
def update_supported_errors(self, specified_errors: Iterable[Exception]) -> None: ...
|
||||
def call_with_retry(self, do, fail): ...
|
||||
def __init__(self, backoff: AbstractBackoff, retries: int, supported_errors: tuple[type[Exception], ...] = ...) -> None: ...
|
||||
def update_supported_errors(self, specified_errors: Iterable[type[Exception]]) -> None: ...
|
||||
def call_with_retry(self, do: Callable[[], _T], fail: Callable[[Exception], object]) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user