From 8e0398ff92f3c022c60a4f06ce264aaab3f6a22a Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Tue, 7 Sep 2021 14:11:30 -0400 Subject: [PATCH] Correct type annotations for utils.retry() The interval and backoff_rate parameters passed to tenacity are floats, not ints. Change-Id: Ic5470b7fccfb7e84f36dfb7da6ed6733e38d6dd0 --- cinder/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/utils.py b/cinder/utils.py index 62db1b5adf3..db9721c1bea 100644 --- a/cinder/utils.py +++ b/cinder/utils.py @@ -633,9 +633,9 @@ def retry(retry_param: Union[None, Tuple[Type[Exception], ...], int, Tuple[int, ...]], - interval: int = 1, + interval: float = 1, retries: int = 3, - backoff_rate: int = 2, + backoff_rate: float = 2, wait_random: bool = False, retry=tenacity.retry_if_exception_type) -> Callable: