diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a4ff5b..57e7e64 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: hooks: - id: check-bash-syntax - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.910 + rev: v1.16.1 hooks: - id: mypy args: diff --git a/ecs_logging/_stdlib.py b/ecs_logging/_stdlib.py index 33536bb..28e9f13 100644 --- a/ecs_logging/_stdlib.py +++ b/ecs_logging/_stdlib.py @@ -46,10 +46,6 @@ _LOGRECORD_DIR = set() -def _converter(secs: Optional[float] = None) -> time.struct_time: - return time.gmtime(secs) - - class StdlibFormatter(logging.Formatter): """ECS Formatter for the standard library ``logging`` module""" @@ -77,8 +73,7 @@ class StdlibFormatter(logging.Formatter): "process", "message", } | _LOGRECORD_DIR - - convert = _converter + converter: Callable[[Optional[float]], time.struct_time] = staticmethod(time.gmtime) def __init__( self,