From 24721dd3426910365fd325371487ef87f93a68d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Wed, 30 Mar 2022 11:15:38 +0000 Subject: [PATCH] better type hinting --- api/kiwi_vpn_api/config.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/api/kiwi_vpn_api/config.py b/api/kiwi_vpn_api/config.py index 085fa44..e27cd8e 100644 --- a/api/kiwi_vpn_api/config.py +++ b/api/kiwi_vpn_api/config.py @@ -37,11 +37,19 @@ class Settings(BaseSettings): redoc_url: str | None = "/redoc" @classmethod - @property @functools.lru_cache - def _(cls) -> Settings: + def load(cls) -> Settings: return cls() + @classmethod + @property + def _(cls) -> Settings: + """ + Shorthand for load() + """ + + return cls.load() + @property def config_file(self) -> Path: return self.data_dir.joinpath(self.config_file_name)