Skip to content

Commit

Permalink
fix(graphviz): ensure all lines are left-justified (#10783)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepyaman authored Feb 4, 2025
1 parent 12a45cf commit 3e86e2d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ibis/expr/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ def get_label(node):
)
if nodename is not None:
if isinstance(node, ops.Relation):
label_fmt = "<<I>{}</I>: <B>{}</B>{}>"
label_fmt = "<<I>{}</I>: <B>{}</B>{}"
else:
label_fmt = '<<I>{}</I>: <B>{}</B><BR ALIGN="LEFT" />:: {}>'
label_fmt = '<<I>{}</I>: <B>{}</B><BR ALIGN="LEFT" />:: {}'
# typename is already escaped
label = label_fmt.format(escape(nodename), escape(name), typename)
else:
if isinstance(node, ops.Relation):
label_fmt = "<<B>{}</B>{}>"
label_fmt = "<<B>{}</B>{}"
else:
label_fmt = '<<B>{}</B><BR ALIGN="LEFT" />:: {}>'
label_fmt = '<<B>{}</B><BR ALIGN="LEFT" />:: {}'
label = label_fmt.format(escape(name), typename)
return label
return f'{label}<BR ALIGN="LEFT" />>'


DEFAULT_NODE_ATTRS = {"shape": "box", "fontname": "Deja Vu Sans Mono"}
Expand Down

0 comments on commit 3e86e2d

Please sign in to comment.