chore: migrate Settings to Pydantic v2 ConfigDict

Replace deprecated Pydantic v1 `class Config:` inner class with
`model_config = SettingsConfigDict(...)` to eliminate the deprecation
warning emitted on every test run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 21:25:45 +01:00
parent b61ded8458
commit 7efaeba283

View File

@@ -1,5 +1,5 @@
from typing import Literal from typing import Literal
from pydantic_settings import BaseSettings from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings): class Settings(BaseSettings):
@@ -54,9 +54,7 @@ class Settings(BaseSettings):
ENV: Literal["dev", "prod"] = "dev" ENV: Literal["dev", "prod"] = "dev"
class Config: model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
env_file = ".env"
env_file_encoding = "utf-8"
settings = Settings() settings = Settings()