Convert formatting to use ruff instead of yapf + isort (#26247)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -15,15 +15,17 @@ def logtime(logger, msg=None):
|
||||
"""
|
||||
|
||||
def _inner(func):
|
||||
|
||||
@functools.wraps(func)
|
||||
def _wrapper(*args, **kwargs):
|
||||
start = time.perf_counter()
|
||||
result = func(*args, **kwargs)
|
||||
elapsed = time.perf_counter() - start
|
||||
|
||||
prefix = f"Function '{func.__module__}.{func.__qualname__}'" \
|
||||
if msg is None else msg
|
||||
prefix = (
|
||||
f"Function '{func.__module__}.{func.__qualname__}'"
|
||||
if msg is None
|
||||
else msg
|
||||
)
|
||||
logger.debug("%s: Elapsed time %.7f secs", prefix, elapsed)
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user