Add type hints and cleanup.
[python_utils.git] / decorator_utils.py
index 07ad881f63a613de38d82d9a54babce92127b1b5..eb5a0c9b9ff581fc3c4398e1e1ab186ec3d00978 100644 (file)
@@ -443,7 +443,7 @@ def retry_if_false(tries: int, *, delay_sec=3.0, backoff=2.0):
     3
     >>> dur > 2.0
     True
-    >>> dur < 2.2
+    >>> dur < 2.3
     True
 
     """
@@ -508,7 +508,6 @@ def thunkify(func):
                 exc[1] = sys.exc_info()  # (type, value, traceback)
                 msg = f"Thunkify has thrown an exception (will be raised on thunk()):\n{traceback.format_exc()}"
                 logger.warning(msg)
-                warnings.warn(msg)
             finally:
                 wait_event.set()