Skip to content

Commit

Permalink
Support older python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fbjorn committed Dec 9, 2024
1 parent ecb9286 commit 51f396c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions firedantic/_async/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def get_document_id(self):
@classmethod
async def find(
cls: Type[TAsyncBareModel],
filter_: Optional[dict[str, str | dict]] = None,
filter_: Optional[Dict[str, Union[str, dict]]] = None,
order_by: Optional[_OrderBy] = None,
limit: Optional[int] = None,
offset: Optional[int] = None,
Expand Down Expand Up @@ -194,7 +194,7 @@ def _add_filter(
@classmethod
async def find_one(
cls: Type[TAsyncBareModel],
filter_: Optional[dict[str, str | dict]] = None,
filter_: Optional[Dict[str, Union[str, dict]]] = None,
order_by: Optional[_OrderBy] = None,
) -> TAsyncBareModel:
"""Returns one model from the DB based on a filter.
Expand Down
4 changes: 2 additions & 2 deletions firedantic/_sync/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def get_document_id(self):
@classmethod
def find(
cls: Type[TBareModel],
filter_: Optional[dict[str, str | dict]] = None,
filter_: Optional[Dict[str, Union[str, dict]]] = None,
order_by: Optional[_OrderBy] = None,
limit: Optional[int] = None,
offset: Optional[int] = None,
Expand Down Expand Up @@ -194,7 +194,7 @@ def _add_filter(
@classmethod
def find_one(
cls: Type[TBareModel],
filter_: Optional[dict[str, str | dict]] = None,
filter_: Optional[Dict[str, Union[str, dict]]] = None,
order_by: Optional[_OrderBy] = None,
) -> TBareModel:
"""Returns one model from the DB based on a filter.
Expand Down

0 comments on commit 51f396c

Please sign in to comment.