Skip to content

Commit

Permalink
adds typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Nov 27, 2023
1 parent 503782d commit 6f3f48f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spinn_utilities/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def __init__(self, logger: logging.Logger, extra=None):
super().__init__(logger, extra)
self.do_log = logger._log # pylint: disable=protected-access

@overrides(logging.LoggerAdapter.log, extend_doc=False)
@overrides(logging.LoggerAdapter.log, extend_doc=False, adds_typing=True)
def log(self, level: int, msg: object, *args, **kwargs):
"""
Delegate a log call to the underlying logger, applying appropriate
Expand Down Expand Up @@ -243,7 +243,8 @@ def log(self, level: int, msg: object, *args, **kwargs):
log_kwargs["exc_info"] = kwargs["exc_info"]
self.do_log(level, message, (), **log_kwargs)

@overrides(logging.LoggerAdapter.process, extend_doc=False)
@overrides(logging.LoggerAdapter.process, extend_doc=False,
adds_typing=True)
def process(self, msg: object, kwargs) -> Tuple[object, dict]:
"""
Process the logging message and keyword arguments passed in to a
Expand Down

0 comments on commit 6f3f48f

Please sign in to comment.