Skip to content

Commit

Permalink
style: reformat codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Nov 26, 2024
1 parent 694a95d commit dc09ab4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions tdd/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,11 @@ def json_ld_to_ntriples(ld_content):
input_data = json.dumps(ld_content) + "\n"
with resources.path("tdd.lib", "transform-to-nt.js") as transform_lib_path:
p = subprocess.Popen(
[
"node",
transform_lib_path
],
["node", transform_lib_path],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True
universal_newlines=True,
)
p.stdin.write(input_data)
p.stdin.flush()
Expand Down Expand Up @@ -111,14 +108,11 @@ def frame_nt_content(nt_content, frame):
input_data = json.dumps([ntriples, frame]) + "\n"
with resources.path("tdd.lib", "frame-jsonld.js") as frame_lib_path:
p = subprocess.Popen(
[
"node",
frame_lib_path
],
["node", frame_lib_path],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True
universal_newlines=True,
)
p.stdin.write(input_data)
p.stdin.flush()
Expand All @@ -136,6 +130,6 @@ def get_id_description(uri, content_type, ontology):
if not resp.text.strip() or not (
re.search(r"^[^\#]", resp.text, re.MULTILINE)
): # because some SPARQL endpoint may send "# Empty file" as response
#raise IDNotFound()
# raise IDNotFound()
abort(404)
return resp.text
2 changes: 1 addition & 1 deletion tdd/sparql.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def query(
sparqlendpoint,
data={"update": querystring},
)

if resp.status_code not in status_codes:
raise FusekiError(resp)
return resp
Expand Down

0 comments on commit dc09ab4

Please sign in to comment.