From d7167b1d86ba2509205de4a6accbe2a459800c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Fri, 10 Nov 2023 15:10:51 -0800 Subject: [PATCH] Type getitem methods in RecursiveDict --- src/sdsstools/configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdsstools/configuration.py b/src/sdsstools/configuration.py index d0cae63..4693fff 100644 --- a/src/sdsstools/configuration.py +++ b/src/sdsstools/configuration.py @@ -206,13 +206,13 @@ def __init__(self, value: dict[str, Any] = {}, strict_mode: bool = False): dict.__init__(self, value) - def __getitem__(self, __key: str): + def __getitem__(self, __key: str) -> Any: if self.strict_mode: return super().__getitem__(__key) return self.get(__key) - def get(self, __key: str, default: Any = None, strict: bool | None = None): + def get(self, __key: str, default: Any = None, strict: bool | None = None) -> Any: if (strict is None and self.strict_mode is True) or strict is True: return super().get(__key, default)