Skip to content

Commit

Permalink
remvoe redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
csgoh committed Feb 12, 2024
1 parent 7a120cf commit 026c88e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/test_text2diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ def generate_diagram(input_syntax: str, painter_type: str = "PNG"):
f"{inspect.currentframe().f_back.f_code.co_name}.svg"
)
_, img = text2diagram.render(input_syntax, output_file, show_code=True)
if painter_type == "PNG":
img.save(output_file)
else:
# save gen_code as SVG file
with open(output_file, "w") as f:
f.write(img)

# if painter_type == "PNG":
# img.save(output_file)
# else:
# # save gen_code as SVG file
# with open(output_file, "w") as f:
# f.write(img)


def test_text2diagram_01():
Expand Down

0 comments on commit 026c88e

Please sign in to comment.