From d7df8911e002ba5cb00f780be45000a861339170 Mon Sep 17 00:00:00 2001 From: Federico Ramognino Date: Wed, 29 Apr 2026 11:57:47 +0200 Subject: [PATCH 1/2] refactor: remove over-constraining return type annotation from __new__ method in Logged class --- python_utils/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_utils/logger.py b/python_utils/logger.py index bd988c5..cade324 100644 --- a/python_utils/logger.py +++ b/python_utils/logger.py @@ -331,7 +331,7 @@ def __get_name(cls, *name_parts: str) -> str: LoggerBase._LoggerBase__get_name(*name_parts), # type: ignore[attr-defined] # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType, reportAttributeAccessIssue] ) - def __new__(cls, *args: types.Any, **kwargs: types.Any) -> 'Logged': + def __new__(cls, *args: types.Any, **kwargs: types.Any): """ Create a new instance of the class and initialize the logger. From c3f3218c1d8897e53ade7cd581b34e1395b4203c Mon Sep 17 00:00:00 2001 From: Federico Ramognino <119409525+RamogninoF@users.noreply.github.com> Date: Wed, 29 Apr 2026 13:49:11 +0200 Subject: [PATCH 2/2] Update python_utils/logger.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- python_utils/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_utils/logger.py b/python_utils/logger.py index cade324..ff20279 100644 --- a/python_utils/logger.py +++ b/python_utils/logger.py @@ -331,7 +331,7 @@ def __get_name(cls, *name_parts: str) -> str: LoggerBase._LoggerBase__get_name(*name_parts), # type: ignore[attr-defined] # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType, reportAttributeAccessIssue] ) - def __new__(cls, *args: types.Any, **kwargs: types.Any): + def __new__(cls, *args: types.Any, **kwargs: types.Any) -> types.Self: """ Create a new instance of the class and initialize the logger.