Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
miararoy committed Oct 4, 2023
1 parent 2c9a30e commit 799f3ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion resin/knoweldge_base/knowledge_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ def query(self,
results = self._reranker.rerank(results)

return [
QueryResult(**r.dict(exclude={'values', 'sprase_values'})) for r in results
QueryResult(
**r.dict(exclude={'values', 'sprase_values', 'document_id'})
) for r in results
]

def _query_index(self,
Expand Down
4 changes: 2 additions & 2 deletions tests/system/knowledge_base/test_knowledge_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def test_upsert_dataframe_with_wrong_schema(knowledge_base, documents):
df = pd.DataFrame([{"id": doc.id, "txt": doc.text, "metadata": doc.metadata}
for doc in documents])

with pytest.raises(ValidationError) as e:
with pytest.raises(ValidationError):
knowledge_base.upsert_dataframe(df)


Expand All @@ -241,7 +241,7 @@ def test_upsert_dataframe_with_redundant_col(knowledge_base, documents):
"bla": "bla"}
for doc in documents])

with pytest.raises(ValidationError) as e:
with pytest.raises(ValidationError):
knowledge_base.upsert_dataframe(df)


Expand Down

0 comments on commit 799f3ac

Please sign in to comment.