Skip to content

Commit bd2abc6

Browse files
committed
Some create_benchmark.py script enhancements (v3).
This patch is held at linterpoint. Here's the ransom.
1 parent 783a9c6 commit bd2abc6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

benchmark/scripts/create_benchmark.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,18 @@ def create_benchmark_file(name):
4747
and places it in the `single-source` directory.
4848
"""
4949

50-
template_path = create_relative_path("Template.swift")
5150
file_text = ""
52-
51+
template_path = create_relative_path("Template.swift")
5352
with open(template_path, "r") as f:
5453
file_text = "".join(f.readlines())
5554

5655
# fill in missing template details
5756
file_text = file_text.format(
58-
name = name,
59-
padding = "-" * (56 - len(name)),
60-
year = datetime.date.today().year
57+
name=name,
58+
padding="-" * (56 - len(name)),
59+
year=datetime.date.today().year
6160
)
62-
61+
6362
file_path_prefix = create_relative_path("../single-source/")
6463
file_path = os.path.join(file_path_prefix, name + ".swift")
6564
with open(file_path, "w") as f:

0 commit comments

Comments
 (0)