Skip to content

Commit 749ff91

Browse files
committed
chore: Valkey - improve typing
1 parent ea0041d commit 749ff91

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • integrations/valkey/src/haystack_integrations/document_stores/valkey

integrations/valkey/src/haystack_integrations/document_stores/valkey/document_store.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,9 @@ def delete_documents(self, document_ids: list[str]) -> None:
734734
"""
735735
client = self._get_connection()
736736

737-
keys: list[str | bytes] = [f"{self._index_name}:{doc_id}" for doc_id in document_ids]
737+
keys: list[str | bytes | bytearray | memoryview[int]] = [
738+
f"{self._index_name}:{doc_id}" for doc_id in document_ids
739+
]
738740
try:
739741
result = client.delete(keys)
740742
if result < len(document_ids):
@@ -770,7 +772,9 @@ async def delete_documents_async(self, document_ids: list[str]) -> None:
770772
"""
771773
client = await self._get_connection_async()
772774

773-
keys: list[str | bytes] = [f"{self._index_name}:{doc_id}" for doc_id in document_ids]
775+
keys: list[str | bytes | bytearray | memoryview[int]] = [
776+
f"{self._index_name}:{doc_id}" for doc_id in document_ids
777+
]
774778
try:
775779
result = await client.delete(keys)
776780
if result < len(document_ids):

0 commit comments

Comments
 (0)