typesense-python
typesense-python copied to clipboard
Incorrect type annotation for DeleteQueryParameters
The following code causes a type error with mypy:
collection.documents.delete({"truncate": True})
test.py:1: error: Argument 1 to "delete" of "Documents" has incompatible type "dict[str, bool]";
expected "DeleteQueryParameters | None" [arg-type]
collection.documents.delete({"truncate": True})
Because the filter_by key is declared as required in the declaration of DeleteQueryParameters:
https://github.com/typesense/typesense-python/blob/bd8a43dfe5aff297af33672da60998785e2e6e00/src/typesense/types/document.py#L929-L932