Making Flake8 happy
This commit is contained in:
parent
10ef0874b5
commit
18650e6fca
@ -115,7 +115,7 @@ def throttle(func: Callable[..., Any], min_secs: float, *args, **kwargs) -> Any:
|
|||||||
:return: Any
|
:return: Any
|
||||||
"""
|
"""
|
||||||
start = time.time()
|
start = time.time()
|
||||||
(result, extra_time) = func(*args, **kwargs)
|
(result, extra_time) = func(*args, **kwargs)
|
||||||
end = time.time()
|
end = time.time()
|
||||||
duration = max(max(min_secs - (end - start), 0.0), extra_time)
|
duration = max(max(min_secs - (end - start), 0.0), extra_time)
|
||||||
logger.debug('Throttling %s for %.2f seconds', func.__name__, duration)
|
logger.debug('Throttling %s for %.2f seconds', func.__name__, duration)
|
||||||
|
Loading…
Reference in New Issue
Block a user