Skip to content

Commit

Permalink
♻️ refactor: change deprecated import
Browse files Browse the repository at this point in the history
  • Loading branch information
ezeparziale committed Dec 26, 2023
1 parent 124e4d5 commit 6edd44f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/core/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any, List, Optional

from pydantic import AnyHttpUrl, PostgresDsn, field_validator
from pydantic_core.core_schema import FieldValidationInfo
from pydantic_core.core_schema import ValidationInfo
from pydantic_settings import BaseSettings, SettingsConfigDict


Expand Down Expand Up @@ -35,7 +35,7 @@ class Settings(BaseSettings):
SQLALCHEMY_DATABASE_URI: Optional[PostgresDsn] = None

@field_validator("SQLALCHEMY_DATABASE_URI", mode="before")
def assemble_db_connection(cls, v: str | None, info: FieldValidationInfo) -> Any:
def assemble_db_connection(cls, v: str | None, info: ValidationInfo) -> Any:
if isinstance(v, str):
return v
return PostgresDsn.build(
Expand Down

0 comments on commit 6edd44f

Please sign in to comment.