Skip to content

Commit

Permalink
update type hint signatures for find_one_and_*
Browse files Browse the repository at this point in the history
  • Loading branch information
brondsem committed Nov 26, 2024
1 parent ce434f5 commit c4fdb38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ming/metadata.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ class _ClassManager(Generic[M]):
def remove(self, spec_or_id: Union[MongoFilter, ObjectId] = None, **kwargs) -> DeleteResult: ...
def count(self) -> int: ...
def update_partial(self, filter: MongoFilter, fields: dict, **kwargs) -> UpdateResult: ...
def find_one_and_update(self, **kwargs) -> M: ...
def find_one_and_replace(self, **kwargs) -> M: ...
def find_one_and_delete(self, **kwargs) -> M: ...
def find_one_and_update(self, filter: MongoFilter, update: dict, **kwargs) -> M: ...
def find_one_and_replace(self, filter: MongoFilter, replacement: dict, *args, **kwargs) -> M: ...
def find_one_and_delete(self, filter: MongoFilter, **kwargs) -> M: ...
def aggregate(self, pipeline: list, **kwargs) -> CommandCursor: ...
def distinct(self, key: str, filter: MongoFilter | None = None, **kwargs) -> list: ...
"""
Expand Down
6 changes: 3 additions & 3 deletions ming/odm/mapper.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class _ClassQuery(Generic[TMappedClass]):
def find_by(self, filter: MongoFilter = None, *args, **kwargs) -> Cursor[TMappedClass]: ...
def remove(self, spec_or_id: Union[MongoFilter, ObjectId] = None, **kwargs) -> ChangeResult: ...
def count(self) -> int: ...
def find_one_and_update(self, **kwargs) -> TMappedClass: ...
def find_one_and_replace(self, **kwargs) -> TMappedClass: ...
def find_one_and_delete(self, **kwargs) -> TMappedClass: ...
def find_one_and_update(self, filter: MongoFilter, update: dict, **kwargs) -> TMappedClass: ...
def find_one_and_replace(self, filter: MongoFilter, replacement: dict, *args, **kwargs) -> TMappedClass: ...
def find_one_and_delete(self, filter: MongoFilter, **kwargs) -> TMappedClass: ...
def update_partial(self, filter: MongoFilter, fields: dict, **kwargs) -> ChangeResult: ...
def aggregate(self, pipeline: list, **kwargs) -> CommandCursor: ...
def distinct(self, key: str, filter: MongoFilter | None = None, **kwargs) -> list: ...
Expand Down

0 comments on commit c4fdb38

Please sign in to comment.