From 1a13dfb61676a93b41772aa086127332b22aa7ba Mon Sep 17 00:00:00 2001 From: switch-to-gitlab <73752374+switch-to-gitlab@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:36:00 -0400 Subject: [PATCH] add a type annotation to constructor. This commit adds the return type to the constructor. This does not affect runtime behavior but helps users of this package who are using a strict typechecker like `mypy --strict`. --- src/pythonjsonlogger/jsonlogger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py index 519a64d..109148a 100644 --- a/src/pythonjsonlogger/jsonlogger.py +++ b/src/pythonjsonlogger/jsonlogger.py @@ -120,7 +120,7 @@ def __init__( reserved_attrs: Tuple[str, ...] = RESERVED_ATTRS, timestamp: Union[bool, str] = False, **kwargs: Any - ): + ) -> None: """ :param json_default: a function for encoding non-standard objects as outlined in https://docs.python.org/3/library/json.html