From 1310bd9079aaa66cfe7da2926a4311e2dfb77957 Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Tue, 17 Dec 2024 10:58:48 +0100 Subject: [PATCH] fix lints --- jupyter_events/logger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jupyter_events/logger.py b/jupyter_events/logger.py index 98955ae..00de2dd 100644 --- a/jupyter_events/logger.py +++ b/jupyter_events/logger.py @@ -27,7 +27,7 @@ if parse(version_info) >= parse("3.1.0"): from pythonjsonlogger.json import JsonFormatter else: - from pythonjsonlogger.jsonlogger import JsonFormatter + from pythonjsonlogger.jsonlogger import JsonFormatter # type: ignore[attr-defined] # Increment this version when the metadata included with each event # changes. @@ -179,7 +179,7 @@ def _handle_message_field(record: t.Any, **kwargs: t.Any) -> str: del record["message"] return json.dumps(record, **kwargs) - formatter = JsonFormatter( # type:ignore [no-untyped-call] + formatter = JsonFormatter( json_serializer=_handle_message_field, ) handler.setFormatter(formatter)