Skip to content

Commit

Permalink
Fix black issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ikelos committed Mar 19, 2024
1 parent bb894b0 commit 00ae5d4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions volumetric/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,9 @@ def visitor(node, accumulator):
# We append "h" to ensure the value is treated as a string when it's returned to python
item_dict = {
"volumetric_id": "h" + str(node.__hash__()),
"volumetric_parent": ("h" + str(node.parent.__hash__()))
if node.parent
else None,
"volumetric_parent": (
("h" + str(node.parent.__hash__())) if node.parent else None
),
"hasChildren": bool(result.children(node)),
}
item_dict.update(node.asdict())
Expand All @@ -534,9 +534,9 @@ def visitor(node, accumulator):
result.visit(None, visitor, initial_accumulator=[], sort_key=sort_key)
)
cached_results = job.get("cached_results", {})
cached_results[
(job_id, parent_row_id, sort_property, sort_direction)
] = result_list
cached_results[(job_id, parent_row_id, sort_property, sort_direction)] = (
result_list
)
job["cached_results"] = cached_results

return {
Expand Down Expand Up @@ -587,9 +587,9 @@ def download_file(self, job_id, file_id):
file_id = json.loads(file_id)
if file_id > len(files) or 0 > file_id:
return None
cherrypy.response.headers[
"Content-Disposition"
] = 'inline; filename="{}" '.format(files[file_id].preferred_filename)
cherrypy.response.headers["Content-Disposition"] = (
'inline; filename="{}" '.format(files[file_id].preferred_filename)
)
return files[file_id].getvalue()

@cherrypy.expose
Expand Down

0 comments on commit 00ae5d4

Please sign in to comment.