Commit 1e37bb83 authored by Gitlab CI's avatar Gitlab CI Committed by Alex Pearce
Browse files

Fixed formatting

patch generated by https://gitlab.cern.ch/lhcb/Moore/-/jobs/5250635
parent d140edb1
......@@ -621,7 +621,9 @@ class Algorithm(object):
# external links #######
for key, handle in self.inputs.items():
edge = pydot.Edge(html_escape('{}_out_{}'.format(handle.producer.fullname, handle.key)),
edge = pydot.Edge(
html_escape('{}_out_{}'.format(handle.producer.fullname,
handle.key)),
html_escape('{}_in_{}'.format(self.fullname, key)))
graph.add_edge(edge)
handle.producer._graph(graph)
......
......@@ -93,7 +93,9 @@ class CompositeNode(object):
if isinstance(child, Algorithm):
# Must name nodes uniquely within a node, otherwise they will
# only be drawn one (which makes sense for the *data* flow!)
node = pydot.Node(html_escape('{}_{}'.format(self.name, child.fullname)), label=child.fullname)
node = pydot.Node(
html_escape('{}_{}'.format(self.name, child.fullname)),
label=child.fullname)
sg.add_node(node)
else:
node = child._graph(sg)
......
......@@ -349,7 +349,7 @@ class EverythingHandler(object):
self._lines.append(line)
self.addNode(line)
def plot_data_flow(self, filename='data_flow', extensions=('gv',)):
def plot_data_flow(self, filename='data_flow', extensions=('gv', )):
"""Save a visualisation of the current data flow.
Parameters
......@@ -378,7 +378,7 @@ class EverythingHandler(object):
format = 'raw' if ext == 'gv' else ext
top.write('{}.{}'.format(filename, ext), format=format)
def plot_control_flow(self, filename='control_flow', extensions=('gv',)):
def plot_control_flow(self, filename='control_flow', extensions=('gv', )):
"""Save a visualisation of the current control flow.
Parameters
......@@ -399,7 +399,8 @@ class EverythingHandler(object):
"""
# Find the node at the top of the control flow
# This is the node which is not a child of any other node
child_nodes = set(child for node in self._nodes for child in node.children)
child_nodes = set(
child for node in self._nodes for child in node.children)
top_node = None
for node in self._nodes:
if node not in child_nodes:
......@@ -409,7 +410,8 @@ class EverythingHandler(object):
now = _gaudi_datetime_format(datetime.datetime.now())
label = 'Control flow generated at {}'.format(now)
graph = pydot.Dot(graph_name='control_flow', label=label, strict=True, compound=True)
graph = pydot.Dot(
graph_name='control_flow', label=label, strict=True, compound=True)
top_node._graph(graph)
for ext in extensions:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment