Skip to content

Commit

Permalink
Fix Pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdankostic committed May 3, 2023
1 parent 8ff82f4 commit 3ec1ddf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion haystack/document_stores/weaviate.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,20 @@ def _create_schema_and_index(self, index: Optional[str] = None, recreate_index:
)

def _convert_weaviate_result_to_document(
self, result: dict, return_embedding: bool, scale_score: bool = True, json_properties: List[str] = []
self,
result: dict,
return_embedding: bool,
scale_score: bool = True,
json_properties: Optional[List[str]] = None,
) -> Document:
"""
Convert weaviate result dict into haystack document object. This is more involved because
weaviate search result dict varies between get and query interfaces.
Weaviate get methods return the data items in properties key, whereas the query doesn't.
"""
if json_properties is None:
json_properties = []

score = None
content = ""

Expand Down

0 comments on commit 3ec1ddf

Please sign in to comment.