From a8cc2e44ec347df11b72882eb9bef350234c2a74 Mon Sep 17 00:00:00 2001 From: Nathanael DEMACON Date: Sat, 28 Dec 2024 15:46:40 +0100 Subject: [PATCH] rename the variable label Signed-off-by: Nathanael DEMACON --- treelib/tree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/treelib/tree.py b/treelib/tree.py index c687ec1..7bc4e7e 100644 --- a/treelib/tree.py +++ b/treelib/tree.py @@ -1097,8 +1097,8 @@ def to_graphviz( sorting=sorting, ): nid = self[n].identifier - tag = str(self[n].tag).translate(str.maketrans({'"': r"\""})) - state = '"{0}" [label="{1}", shape={2}]'.format(nid, tag, shape) + label = str(self[n].tag).translate(str.maketrans({'"': r"\""})) + state = '"{0}" [label="{1}", shape={2}]'.format(nid, label, shape) nodes.append(state) for c in self.children(nid):