From f3e24904009631e6db3a094d0586f3b0783232e0 Mon Sep 17 00:00:00 2001 From: Julian Risch Date: Thu, 8 Apr 2021 13:32:11 +0200 Subject: [PATCH] Removed type annotation --- haystack/graph_retriever/text_to_sparql.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/haystack/graph_retriever/text_to_sparql.py b/haystack/graph_retriever/text_to_sparql.py index 1b170b03a9..60a715e0a3 100644 --- a/haystack/graph_retriever/text_to_sparql.py +++ b/haystack/graph_retriever/text_to_sparql.py @@ -40,13 +40,12 @@ def retrieve(self, query: str, top_k: Optional[int] = None): # if there are no answers we still want to return something if len(answers) == 0: - answers.append(("", query)) + answers.append(("", "")) results = answers[:self.top_k] results = [self.format_result(result) for result in results] return results - def _query_kg(self, sparql_query: str): - # query KG + def _query_kg(self, sparql_query): try: response = self.knowledge_graph.query(sparql_query=sparql_query)