Skip to content

Commit

Permalink
fix: f-string error on Python < 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
juba committed May 24, 2024
1 parent cf2a8c8 commit 1803f77
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pyobsplot/obsplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,14 @@ def typst_render(self, res, format, options) -> bytes: # noqa: A002
'#import "template.typ": obsplot\n#show: obsplot("jsdom.html",'
)
if "margin" in options:
typst_content += f"margin: {options['margin']}pt,"
value = options["margin"]
typst_content += f"margin: {value}pt,"
if "font" in options:
typst_content += f'font-family: "{options['font']}",'
value = options["font"]
typst_content += f'font-family: "{value}",'
if "scale" in options:
typst_content += f"scale: {options['scale']},"
value = options["scale"]
typst_content += f"scale: {value},"
typst_content += ")"
typst_file.write(typst_content)
typst.compile(input_file, output=output_file, ppi=100, format=format)
Expand Down

0 comments on commit 1803f77

Please sign in to comment.