Skip to content

Commit

Permalink
Improve BaseSettings typing
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Nov 23, 2023
1 parent e5876a6 commit 0fa085b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from enum import Enum
from pathlib import Path

from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict

ROOT_DIR = Path(__file__).parent.parent
Expand Down Expand Up @@ -35,8 +36,8 @@ class Settings(BaseSettings):
postgres_user: str
postgres_password: str
postgres_host: str
postgres_port: int = 5432
cors_allow_origins: list = []
postgres_port: int = Field(default=5432)
cors_allow_origins: list[str] = Field(default=[])
oauth2_server_url: str | None = None
sentry_dns: str | None = None
log_level: LoggingLevel = LoggingLevel.INFO
Expand Down

0 comments on commit 0fa085b

Please sign in to comment.