fix param typing in retry decor (#1799)

This commit is contained in:
Shuchang Zheng
2025-02-20 02:54:30 -08:00
committed by GitHub
parent fdad4f8ac3
commit d02b45c74c

View File

@@ -14,8 +14,8 @@ F = TypeVar("F", bound=Callable[..., Any])
def retry(
exceptions: Type[Exception] | tuple[Type[Exception], ...] | None = None,
tries: int = 3,
delay: int = 3,
backoff: int = 2,
delay: float = 3.0,
backoff: float = 2.0,
) -> Callable[[F], F]:
"""
Decorator to retry a function a specified number of times with a delay between attempts.