Skip to content

Commit

Permalink
Merge pull request #1323 from uriyyo/dependabot/pip/beanie-1.27.0
Browse files Browse the repository at this point in the history
[no ci]
  • Loading branch information
github-actions[bot] authored Oct 8, 2024
2 parents 8a5ccfa + a948d6d commit a602457
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
12 changes: 9 additions & 3 deletions fastapi_pagination/ext/beanie.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from __future__ import annotations

__all__ = ["paginate"]

from typing import Any, List, Optional, Tuple, Type, TypeVar, Union
from typing import TYPE_CHECKING, Any, List, Optional, Tuple, Type, TypeVar, Union

from beanie import Document
from beanie.odm.enums import SortDirection
from beanie.odm.interfaces.aggregate import ClientSession, DocumentProjectionType
from beanie.odm.interfaces.aggregate import DocumentProjectionType
from beanie.odm.queries.aggregation import AggregationQuery
from beanie.odm.queries.find import FindMany

Expand All @@ -13,6 +15,10 @@
from ..types import AdditionalData, AsyncItemsTransformer
from ..utils import verify_params

if TYPE_CHECKING:
from motor.motor_asyncio import AsyncIOMotorClientSession


TDocument = TypeVar("TDocument", bound=Document)


Expand All @@ -24,7 +30,7 @@ async def paginate(
additional_data: Optional[AdditionalData] = None,
projection_model: Optional[Type[DocumentProjectionType]] = None,
sort: Union[None, str, List[Tuple[str, SortDirection]]] = None,
session: Optional[ClientSession] = None,
session: Optional[AsyncIOMotorClientSession] = None,
ignore_cache: bool = False,
fetch_links: bool = False,
lazy_parse: bool = False,
Expand Down
15 changes: 11 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a602457

Please sign in to comment.