better type hinting
This commit is contained in:
parent
e1ae186382
commit
24721dd342
1 changed files with 10 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue