Annotate some redis.backoff items (#8352)

This commit is contained in:
Nikita Sobolev
2022-07-21 17:52:15 +03:00
committed by GitHub
parent 10bc4b0584
commit 6fa7846edd

View File

@@ -1,30 +1,29 @@
from abc import ABC, abstractmethod
class AbstractBackoff(ABC):
def reset(self): ...
def reset(self) -> None: ...
@abstractmethod
def compute(self, failures): ...
def compute(self, failures: int) -> float: ...
class ConstantBackoff(AbstractBackoff):
def __init__(self, backoff) -> None: ...
def compute(self, failures): ...
def __init__(self, backoff: int) -> None: ...
def compute(self, failures: int) -> float: ...
class NoBackoff(ConstantBackoff):
def __init__(self) -> None: ...
class ExponentialBackoff(AbstractBackoff):
def __init__(self, cap, base) -> None: ...
def compute(self, failures): ...
def __init__(self, cap: int, base: int) -> None: ...
def compute(self, failures: int) -> float: ...
class FullJitterBackoff(AbstractBackoff):
def __init__(self, cap, base) -> None: ...
def compute(self, failures): ...
def __init__(self, cap: int, base: int) -> None: ...
def compute(self, failures: int) -> float: ...
class EqualJitterBackoff(AbstractBackoff):
def __init__(self, cap, base) -> None: ...
def compute(self, failures): ...
def __init__(self, cap: int, base: int) -> None: ...
def compute(self, failures: int) -> float: ...
class DecorrelatedJitterBackoff(AbstractBackoff):
def __init__(self, cap, base) -> None: ...
def reset(self) -> None: ...
def compute(self, failures): ...
def __init__(self, cap: int, base: int) -> None: ...
def compute(self, failures: int) -> float: ...