Skip to content

Commit

Permalink
f-strings: tools/docs_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor authored and LarsAsplund committed Sep 27, 2021
1 parent b1a9acd commit 89ad034
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/docs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def examples():
if loc.is_dir():
_data = _get_eg_doc(
loc,
"https://github.com/VUnit/vunit/tree/master/examples/%s/%s" % (subdir, item),
f"https://github.com/VUnit/vunit/tree/master/examples/{subdir!s}/{item!s}",
)
if _data:
egs_fptr.write(_data)
Expand Down Expand Up @@ -68,7 +68,7 @@ def _get_eg_doc(location: Path, ref):
print("WARNING: 'run.py' file in example subdir '" + nstr + "' does not contain a docstring. Skipping...")
return ""

title = "`%s <%s/>`_" % (eg_doc.split("---", 1)[0][0:-1], ref)
title = f"`{eg_doc.split('---', 1)[0][0:-1]!s} <{ref!s}/>`_"
return "\n".join([title, "-" * len(title), eg_doc.split("---\n", 1)[1], "\n"])


Expand Down

0 comments on commit 89ad034

Please sign in to comment.