diff --git a/ming/metadata.pyi b/ming/metadata.pyi index ea08f9e..a854b1e 100644 --- a/ming/metadata.pyi +++ b/ming/metadata.pyi @@ -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: ... """ diff --git a/ming/odm/mapper.pyi b/ming/odm/mapper.pyi index 43ce273..0870048 100644 --- a/ming/odm/mapper.pyi +++ b/ming/odm/mapper.pyi @@ -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: ...