Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tenacity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def __exit__(
self,
exc_type: type[BaseException] | None,
exc_value: BaseException | None,
traceback: t.Optional["types.TracebackType"],
traceback: "types.TracebackType | None",
) -> bool | None:
if exc_type is not None and exc_value is not None:
self.retry_state.set_exception((exc_type, exc_value, traceback))
Expand All @@ -221,7 +221,7 @@ async def __aexit__(
self,
exc_type: type[BaseException] | None,
exc_value: BaseException | None,
traceback: t.Optional["types.TracebackType"],
traceback: "types.TracebackType | None",
) -> bool | None:
return self.__exit__(exc_type, exc_value, traceback)

Expand Down Expand Up @@ -259,8 +259,8 @@ def __init__(
def copy(
self,
sleep: t.Callable[[int | float], None] | object = _unset,
stop: t.Union["StopBaseT", object] = _unset,
wait: t.Union["WaitBaseT", object] = _unset,
stop: "StopBaseT | object" = _unset,
wait: "WaitBaseT | object" = _unset,
retry: retry_base | object = _unset,
before: t.Callable[["RetryCallState"], None] | object = _unset,
after: t.Callable[["RetryCallState"], None] | object = _unset,
Expand Down
2 changes: 1 addition & 1 deletion tenacity/wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __call__(self, retry_state: "RetryCallState") -> float:
def __add__(self, other: "wait_base") -> "wait_combine":
return wait_combine(self, other)

def __radd__(self, other: "wait_base") -> typing.Union["wait_combine", "wait_base"]:
def __radd__(self, other: "wait_base") -> "wait_combine | wait_base":
# make it possible to use multiple waits with the built-in sum function
if other == 0: # type: ignore[comparison-overlap]
return self
Expand Down
Loading