Skip to content

Commit a3d344b

Browse files
committed
fix more mypy type errors
1 parent 311d33d commit a3d344b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libs/elasticsearch/tests/integration_tests/_async/test_retrievers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ async def test_fail_content_field_and_mapper(
220220
with pytest.raises(ValueError):
221221
AsyncElasticsearchRetriever(
222222
content_field="text",
223-
document_mapper=lambda x: x, # type: ignore[arg-type]
223+
document_mapper=lambda x: x, # type: ignore[arg-type,return-value]
224224
index_name="foo",
225-
body_func=lambda x: x, # type: ignore[arg-type]
225+
body_func=lambda x: x, # type: ignore[arg-type,return-value]
226226
client=es_client,
227227
)
228228

@@ -235,6 +235,6 @@ async def test_fail_neither_content_field_nor_mapper(
235235
with pytest.raises(ValueError):
236236
AsyncElasticsearchRetriever(
237237
index_name="foo",
238-
body_func=lambda x: x, # type: ignore[arg-type]
238+
body_func=lambda x: x, # type: ignore[arg-type,return-value]
239239
client=es_client,
240240
)

libs/elasticsearch/tests/integration_tests/_sync/test_retrievers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ def test_fail_content_field_and_mapper(self, es_client: Elasticsearch) -> None:
210210
with pytest.raises(ValueError):
211211
ElasticsearchRetriever(
212212
content_field="text",
213-
document_mapper=lambda x: x, # type: ignore[arg-type]
213+
document_mapper=lambda x: x, # type: ignore[arg-type,return-value]
214214
index_name="foo",
215-
body_func=lambda x: x, # type: ignore[arg-type]
215+
body_func=lambda x: x, # type: ignore[arg-type,return-value]
216216
client=es_client,
217217
)
218218

@@ -225,6 +225,6 @@ def test_fail_neither_content_field_nor_mapper(
225225
with pytest.raises(ValueError):
226226
ElasticsearchRetriever(
227227
index_name="foo",
228-
body_func=lambda x: x, # type: ignore[arg-type]
228+
body_func=lambda x: x, # type: ignore[arg-type,return-value]
229229
client=es_client,
230230
)

0 commit comments

Comments
 (0)