Skip to content

Commit

Permalink
lint 2
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis committed Dec 6, 2023
1 parent 84376a9 commit b0e9887
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion libs/langchain/tests/unit_tests/indexes/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def add_documents( # type: ignore
*,
ids: Optional[Sequence[str]] = None,
**kwargs: Any,
) -> None:
) -> List[str]:
"""Add the given documents to the store (insert behavior)."""
if ids and len(ids) != len(documents):
raise ValueError(
Expand All @@ -97,6 +97,8 @@ def add_documents( # type: ignore
)
self.store[_id] = document

return list(ids)

async def aadd_documents(
self,
documents: Sequence[Document],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def similarity_search(
return []
return [res]

def add_documents(self, documents: Sequence[Document]) -> None:
def add_documents(self, documents: Sequence[Document], **kwargs: Any) -> List[str]:
print(documents)
return super().add_documents(
documents, ids=[f"{i}" for i in range(len(documents))]
Expand Down

0 comments on commit b0e9887

Please sign in to comment.