Arkadiusz Ryś 3 лет назад
Родитель
Сommit
7a2f5e551d
2 измененных файлов с 2 добавлено и 4 удалено
  1. 1 3
      spendpoint/endpoint.py
  2. 1 1
      tests/test_query_endpoint.py

+ 1 - 3
spendpoint/endpoint.py

@@ -47,7 +47,6 @@ class SparqlEndpoint(FastAPI):
         title: str,
         description: str,
         version: str,
-        example_query: str,
         functions: Dict[str, Callable[..., Any]],
         graph: Union[Graph, ConjunctiveGraph, Dataset] = ConjunctiveGraph(),
         **kwargs: Any,
@@ -58,7 +57,6 @@ class SparqlEndpoint(FastAPI):
         self.title = title
         self.description = description
         self.version = version
-        self.example_query = example_query
 
         super().__init__(*args, title=title, description=description, version=version, **kwargs)
         rdflib.plugins.sparql.CUSTOM_EVALS["evalCustomFunctions"] = self.eval_custom_functions
@@ -162,7 +160,7 @@ class SparqlEndpoint(FastAPI):
             """Serve YASGUI interface"""
             with open(pkg_resources.resource_filename("spendpoint", "yasgui.html")) as f:
                 html_str = f.read()
-            html_str = html_str.replace("$EXAMPLE_QUERY", self.example_query)
+            html_str = html_str.replace("$EXAMPLE_QUERY", "")
             return Response(content=html_str, media_type="text/html")
 
     def eval_custom_functions(self, ctx: QueryContext, part: CompValue) -> List[Any]:

+ 1 - 1
tests/test_query_endpoint.py

@@ -27,4 +27,4 @@ def query_0():
 
 
 if __name__ == "__main__":
-    query_0()
+    query_0()