From 00ae5d43e33c8603eca3bcec7af0a36d94f22efc Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Tue, 19 Mar 2024 19:27:58 +0000 Subject: [PATCH] Fix black issue --- volumetric/api.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/volumetric/api.py b/volumetric/api.py index e1cecb8..7b936f1 100644 --- a/volumetric/api.py +++ b/volumetric/api.py @@ -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()) @@ -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 { @@ -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