Skip to content

Commit

Permalink
pydantic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
parfenovma committed Jul 17, 2023
1 parent 218061f commit 6377095
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ SQLAlchemy
alembic
requests
pydantic
pydantic-settings
psycopg2-binary
10 changes: 4 additions & 6 deletions src/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from pydantic import AnyUrl, BaseSettings, PostgresDsn
from pydantic import AnyUrl

Check failure on line 1 in src/settings.py

View workflow job for this annotation

GitHub Actions / linting

Imports are incorrectly sorted and/or formatted.
from pydantic import ConfigDict, PostgresDsn
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
Expand All @@ -11,8 +13,4 @@ class Settings(BaseSettings):
PRINT_URL_QR: AnyUrl
MAX_PDF_SIZE_MB: float

class Config:
"""Pydantic BaseSettings config"""

case_sensitive = True
env_file = ".env"
model_config = ConfigDict(case_sensitive=True, env_file=".env", extra="allow")

0 comments on commit 6377095

Please sign in to comment.