Skip to content

Commit

Permalink
remove commented code and update base class sparql method signature
Browse files Browse the repository at this point in the history
  • Loading branch information
lalewis1 committed Nov 30, 2023
1 parent 03a9a7b commit adc3d8a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions prez/routers/sparql.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ async def sparql_endpoint(
headers=prof_and_mt_info.profile_headers,
)
else:
# response = await repo.sparql(query, request.headers.raw)
# return StreamingResponse(
# response.aiter_raw(),
# status_code=response.status_code,
# headers=dict(response.headers),
# background=BackgroundTask(response.aclose),
# )
query_result = await repo.sparql(query, request.headers.raw)
if isinstance(query_result, dict):
return JSONResponse(content=query_result)
Expand Down
2 changes: 1 addition & 1 deletion prez/sparql/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def send_queries(
return g, tabular_results

@abstractmethod
def sparql(self, request):
def sparql(self, query: str, raw_headers: list[tuple[bytes, bytes]], method: str = "GET"):
pass


Expand Down

0 comments on commit adc3d8a

Please sign in to comment.