better type hinting

This commit is contained in:
Jörn-Michael Miehe 2022-03-30 11:15:38 +00:00
parent e1ae186382
commit 24721dd342

View file

@ -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)