Skip to content

Commit 021e1df

Browse files
committed
Run linters
1 parent 119b670 commit 021e1df

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ansible_base/jwt_consumer/common/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
from ansible_base.jwt_consumer.common.cache import JWTCache
1515
from ansible_base.jwt_consumer.common.cert import JWTCert, JWTCertException
16+
from ansible_base.lib.logging.runtime import log_excess_runtime
1617
from ansible_base.lib.utils.auth import get_user_by_ansible_id
1718
from ansible_base.lib.utils.translations import translatableConditionally as _
18-
from ansible_base.lib.logging.runtime import log_excess_runtime
1919
from ansible_base.resource_registry.models import Resource, ResourceType
2020
from ansible_base.resource_registry.signals.handlers import no_reverse_sync
2121

ansible_base/lib/logging/runtime.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from collections.abc import Callable
44
from logging import Logger, getLogger
55

6-
76
__all__ = ['log_excess_runtime']
87

98

@@ -15,12 +14,14 @@
1514
DEFAULT_MSG = 'Running {name} took {delta:.2f}s'
1615

1716

18-
def log_excess_runtime(ext_logger: Logger, cutoff: float = 5.0, debug_cutoff: float =2.0, msg: str = DEFAULT_MSG, add_log_data: bool=False):
17+
def log_excess_runtime(ext_logger: Logger, cutoff: float = 5.0, debug_cutoff: float = 2.0, msg: str = DEFAULT_MSG, add_log_data: bool = False):
1918
"""Utility to write logs to the passed-in logger if the function it decorates takes too long.
2019
2120
Call this with the configuration options to return a decorator."""
21+
2222
def log_excess_runtime_decorator(func: Callable):
2323
"""Instantiated decorator for the DAB excess runtime logger utility"""
24+
2425
@functools.wraps(func)
2526
def _new_func(*args, **kwargs):
2627
log_data = {'name': repr(func.__name__)}

0 commit comments

Comments
 (0)