mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-17 23:34:13 +08:00
Re-organize directory structure (#4971)
See discussion in #2491 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
2
stubs/retry/METADATA.toml
Normal file
2
stubs/retry/METADATA.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
version = "0.1"
|
||||
python2 = true
|
||||
1
stubs/retry/retry/__init__.pyi
Normal file
1
stubs/retry/retry/__init__.pyi
Normal file
@@ -0,0 +1 @@
|
||||
from .api import retry as retry
|
||||
28
stubs/retry/retry/api.pyi
Normal file
28
stubs/retry/retry/api.pyi
Normal file
@@ -0,0 +1,28 @@
|
||||
from logging import Logger
|
||||
from typing import Any, Callable, Dict, Optional, Sequence, Tuple, Type, TypeVar, Union
|
||||
|
||||
_T = TypeVar("_T", bound=Callable[..., Any])
|
||||
_Decorator = Callable[[_T], _T]
|
||||
_R = TypeVar("_R")
|
||||
|
||||
def retry_call(
|
||||
f: Callable[..., _R],
|
||||
fargs: Optional[Sequence[Any]] = ...,
|
||||
fkwargs: Optional[Dict[str, Any]] = ...,
|
||||
exceptions: Union[Type[Exception], Tuple[Type[Exception], ...]] = ...,
|
||||
tries: int = ...,
|
||||
delay: float = ...,
|
||||
max_delay: Optional[float] = ...,
|
||||
backoff: float = ...,
|
||||
jitter: Union[Tuple[float, float], float] = ...,
|
||||
logger: Optional[Logger] = ...,
|
||||
) -> _R: ...
|
||||
def retry(
|
||||
exceptions: Union[Type[Exception], Tuple[Type[Exception], ...]] = ...,
|
||||
tries: int = ...,
|
||||
delay: float = ...,
|
||||
max_delay: Optional[float] = ...,
|
||||
backoff: float = ...,
|
||||
jitter: Union[Tuple[float, float], float] = ...,
|
||||
logger: Optional[Logger] = ...,
|
||||
) -> _Decorator: ...
|
||||
Reference in New Issue
Block a user