Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI authored and hbmartin committed Jul 2, 2024
1 parent 2dd60d5 commit 8124058
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion graphviz2drawio/mx/Node.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def text_to_mx_value(self):
last_text = len(self.texts) - 1
for i, t in enumerate(self.texts):
style = t.get_mx_style()
value += "<p style='" + style + "'>" + t.text + "</p>"
value += f"<p style='{style}'>{t.text}</p>"
if i != last_text:
value += "<hr size='1'/>"
return value
4 changes: 2 additions & 2 deletions test/test_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def check_style(e, check):

def check_value(e, check):
value = e.attrib["value"]
match = re.match(r"<p.*>%s</p>" % check, html.unescape(value))
assert match, "no match found for %s" % value
match = re.match(f"<p.*>{check}</p>", html.unescape(value))
assert match, f"no match found for {value}"


def check_edge(edge, source, target):
Expand Down

0 comments on commit 8124058

Please sign in to comment.