Skip to content

Commit

Permalink
Add support for async sleep functions in tenacity.retry annotation. F…
Browse files Browse the repository at this point in the history
…ixes #399 (#400)
  • Loading branch information
jakkdl authored Aug 14, 2023
1 parent aa6f8f0 commit 41ed242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tenacity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def retry(func: WrappedFn) -> WrappedFn:

@t.overload
def retry(
sleep: t.Callable[[t.Union[int, float]], None] = sleep,
sleep: t.Callable[[t.Union[int, float]], t.Optional[t.Awaitable[None]]] = sleep,
stop: "StopBaseT" = stop_never,
wait: "WaitBaseT" = wait_none(),
retry: "RetryBaseT" = retry_if_exception_type(),
Expand Down

0 comments on commit 41ed242

Please sign in to comment.