Skip to content

Commit 853f06b

Browse files
author
sarangbishal
committed
Update return value flag
1 parent 0ed677e commit 853f06b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/visualiser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ def wrapper(*args, **kwargs):
8888
result = fn(*args, **kwargs)
8989

9090
# #Child Node
91-
92-
child_label = current_function_label + f" => {result}"
91+
child_label = current_function_label
92+
if self.show_return_value:
93+
child_label += f" => {result}"
9394
child_name = current_function_signature
9495
v = pydot.Node(name=child_name, label=child_label)
9596
self.graph.add_node(v)

visualiser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ def wrapper(*args, **kwargs):
8888
result = fn(*args, **kwargs)
8989

9090
# #Child Node
91-
92-
child_label = current_function_label + f" => {result}"
91+
child_label = current_function_label
92+
if self.show_return_value:
93+
child_label += f" => {result}"
9394
child_name = current_function_signature
9495
v = pydot.Node(name=child_name, label=child_label)
9596
self.graph.add_node(v)

0 commit comments

Comments
 (0)