Skip to content

Commit

Permalink
Merge pull request #797 from sanders41/mapping
Browse files Browse the repository at this point in the history
Change JsonMapping from a Mapping to a MutableMapping
  • Loading branch information
sanders41 authored Dec 30, 2023
2 parents dbbb325 + 393e87b commit 3b2907b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions meilisearch_python_sdk/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from datetime import datetime
from functools import partial
from pathlib import Path
from typing import Any, Generator, Mapping, Sequence
from typing import Any, Generator, MutableMapping, Sequence
from urllib.parse import urlencode
from warnings import warn

Expand Down Expand Up @@ -5587,8 +5587,8 @@ async def _async_load_documents_from_file(


def _batch(
documents: Sequence[Mapping], batch_size: int
) -> Generator[Sequence[Mapping], None, None]:
documents: Sequence[MutableMapping], batch_size: int
) -> Generator[Sequence[MutableMapping], None, None]:
total_len = len(documents)
for i in range(0, total_len, batch_size):
yield documents[i : i + batch_size]
Expand Down
4 changes: 2 additions & 2 deletions meilisearch_python_sdk/types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Any, Dict, List, Mapping, Union
from typing import Any, Dict, List, MutableMapping, Union

Filter = Union[str, List[Union[str, List[str]]]]
JsonDict = Dict[str, Any]
JsonMapping = Mapping[str, Any]
JsonMapping = MutableMapping[str, Any]

0 comments on commit 3b2907b

Please sign in to comment.