Closed
Description
Given this codee:
@backoff.on_exception(wait_gen=backoff.expo, exception=requests.exceptions.HTTPError, max_tries=10)
We now get these validation errors from mypy:
11: error: Argument "wait_gen" to "on_exception" has incompatible type "Callable[[float, float, Optional[float]], Generator[Optional[float], Any, None]]"; expected "Callable[..., Generator[float, None, None]]"
10: error: Argument 1 to "on_exception" has incompatible type "Callable[[float, float, Optional[float]], Generator[Optional[float], Any, None]]"; expected "Callable[..., Generator[float, None, None]]"
11: error: Argument 1 to "on_exception" has incompatible type "Callable[[float, float, Optional[float]], Generator[Optional[float], Any, None]]"; expected "Callable[..., Generator[float, None, None]]"
11: error: Argument 1 to "on_exception" has incompatible type "Callable[[float, float, Optional[float]], Generator[Optional[float], Any, None]]"; expected "Callable[..., Generator[float, None, None]]"
Metadata
Metadata
Assignees
Labels
No labels