Lowercase supported_repos setting
This commit is contained in:
parent
24f97db3b3
commit
87b1126721
1 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from pydantic import BaseSettings
|
from pydantic import BaseSettings, validator
|
||||||
|
|
||||||
|
|
||||||
class Settings(BaseSettings):
|
class Settings(BaseSettings):
|
||||||
|
|
@ -24,5 +24,10 @@ class Settings(BaseSettings):
|
||||||
class Config:
|
class Config:
|
||||||
env_prefix = "RUNBOAT_"
|
env_prefix = "RUNBOAT_"
|
||||||
|
|
||||||
|
@validator("supported_repos")
|
||||||
|
@classmethod
|
||||||
|
def validate_supported_repos(v) -> set[str]:
|
||||||
|
return {item.lower() for item in v}
|
||||||
|
|
||||||
|
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue