From 749ff912933b0b01a08bb72bb1730cef2519b2c7 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Thu, 7 May 2026 10:25:08 +0200 Subject: [PATCH] chore: Valkey - improve typing --- .../document_stores/valkey/document_store.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/integrations/valkey/src/haystack_integrations/document_stores/valkey/document_store.py b/integrations/valkey/src/haystack_integrations/document_stores/valkey/document_store.py index 6ff467458b..2292843fdb 100644 --- a/integrations/valkey/src/haystack_integrations/document_stores/valkey/document_store.py +++ b/integrations/valkey/src/haystack_integrations/document_stores/valkey/document_store.py @@ -734,7 +734,9 @@ def delete_documents(self, document_ids: list[str]) -> None: """ client = self._get_connection() - keys: list[str | bytes] = [f"{self._index_name}:{doc_id}" for doc_id in document_ids] + keys: list[str | bytes | bytearray | memoryview[int]] = [ + f"{self._index_name}:{doc_id}" for doc_id in document_ids + ] try: result = client.delete(keys) if result < len(document_ids): @@ -770,7 +772,9 @@ async def delete_documents_async(self, document_ids: list[str]) -> None: """ client = await self._get_connection_async() - keys: list[str | bytes] = [f"{self._index_name}:{doc_id}" for doc_id in document_ids] + keys: list[str | bytes | bytearray | memoryview[int]] = [ + f"{self._index_name}:{doc_id}" for doc_id in document_ids + ] try: result = await client.delete(keys) if result < len(document_ids):