Skip to content

Commit 212be8c

Browse files
authored
chore: pinecone - fix types for Pinecone 9 (#3277)
1 parent aa90109 commit 212be8c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • integrations/pinecone/src/haystack_integrations/document_stores/pinecone

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ def _initialize_index(self) -> None:
9898
f"Connecting to existing index {self.index_name}. `dimension`, `spec`, and `metric` will be ignored."
9999
)
100100

101-
self._index = client.Index(name=self.index_name)
101+
# client.Index returns _Index | GrpcIndex, but using the correct type would require bumping up the pinecone
102+
# minimum supported version
103+
self._index = client.Index(name=self.index_name) # type: ignore[assignment]
104+
105+
assert self._index is not None
102106

103107
actual_dimension = self._index.describe_index_stats().get("dimension")
104108
if actual_dimension and actual_dimension != self.dimension:

0 commit comments

Comments
 (0)