Skip to content

Commit 2361c9d

Browse files
committed
requested changes
1 parent d060e26 commit 2361c9d

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

meilisearch/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ def index(self, uid: str) -> Index:
219219
return Index(self.config, uid=uid)
220220
raise ValueError("The index UID should not be None")
221221

222-
def multi_search(self, queries: Sequence[Mapping[str, Any]],
223-
federation: Optional[Dict[str, Any]] = None) -> Dict[str, List[Dict[str, Any]]]:
222+
def multi_search(
223+
self, queries: Sequence[Mapping[str, Any]], federation: Optional[Dict[str, Any]] = None
224+
) -> Dict[str, List[Dict[str, Any]]]:
224225
"""Multi-index search.
225226
226227
Parameters

tests/client/test_client_multi_search_meilisearch.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ def test_multi_search_on_no_index(client):
3535
client.multi_search([{"indexUid": "indexDoesNotExist", "q": ""}])
3636

3737

38-
def test_multi_search_with_no_value_in_federation(client, empty_index,
39-
index_with_documents):
38+
def test_multi_search_with_no_value_in_federation(client, empty_index, index_with_documents):
4039
"""Tests multi-search with federation, but no value"""
4140
index_with_documents()
4241
empty_index("indexB")
@@ -50,13 +49,10 @@ def test_multi_search_with_no_value_in_federation(client, empty_index,
5049
assert response["offset"] == 0
5150

5251

53-
def test_multi_search_with_offset_and_limit_in_federation(
54-
client,
55-
index_with_documents):
52+
def test_multi_search_with_offset_and_limit_in_federation(client, index_with_documents):
5653
"""Tests multi-search with federation, with offset and limit value"""
5754
index_with_documents()
58-
response = client.multi_search([{"indexUid": INDEX_UID, "q": ""}],
59-
{"offset": 2, "limit": 2})
55+
response = client.multi_search([{"indexUid": INDEX_UID, "q": ""}], {"offset": 2, "limit": 2})
6056

6157
assert "results" not in response
6258
assert len(response["hits"]) == 2
@@ -69,8 +65,8 @@ def test_multi_search_with_federation_options(client, index_with_documents):
6965
"""Tests multi-search with federation, with federation options"""
7066
index_with_documents()
7167
response = client.multi_search(
72-
[{"indexUid": INDEX_UID, "q": "",
73-
"federationOptions": {"weight": 0.99}}], {"limit": 2})
68+
[{"indexUid": INDEX_UID, "q": "", "federationOptions": {"weight": 0.99}}], {"limit": 2}
69+
)
7470

7571
assert "results" not in response
7672
assert isinstance(response["hits"], list)

0 commit comments

Comments
 (0)