Skip to content

Commit bcf312b

Browse files
committed
docs: Precise the ignored mypy error and add a comment explaining why
1 parent da5cb29 commit bcf312b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

haystack/components/retrievers/sentence_window_retriever.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ async def _retrieve_context_for_document_async(self, doc: Document, window_size:
304304

305305
assert split_id is not None
306306
filter_conditions = self._build_filter_conditions(split_id, window_size, source_ids)
307-
context_docs = await self.document_store.filter_documents_async(filter_conditions) # type: ignore
307+
# Ignoring type error because DocumentStore protocol doesn't define filter_documents_async
308+
context_docs = await self.document_store.filter_documents_async(filter_conditions) # type: ignore[misc]
308309
context_text = self.merge_documents_text(context_docs)
309310
context_docs_sorted = sorted(context_docs, key=lambda doc: doc.meta[self.split_id_meta_field])
310311

0 commit comments

Comments
 (0)