Skip to content

Commit

Permalink
fix: bring back Optinal for older Pythons
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Lepekhin committed Nov 26, 2023
1 parent af24032 commit b6d3a5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_db_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict
from typing import Dict, Optional

from pydantic import Field, PostgresDsn
from pydantic_settings import BaseSettings
Expand All @@ -9,8 +9,8 @@

def test_empty():
class DatabaseConfig(BaseDBConfig):
default: PostgresDsn | None = None
replica: Dict | None = None
default: Optional[PostgresDsn] = None
replica: Optional[Dict] = None

db_settings = DatabaseConfig()
assert db_settings.model_dump() == {"default": {}, "replica": {}}
Expand Down

0 comments on commit b6d3a5a

Please sign in to comment.