Skip to content

Commit

Permalink
Use format instead of f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
glorialeezero committed Nov 25, 2024
1 parent f1de0f5 commit 52a2f1d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions qupsy/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ def __str__(self) -> str:
testcases_string.append(
f" ( Input: {input_str},\n Output: {output_str}),"
)
return f"""Spec(
gates: [{", ".join(map(lambda g: g.__name__, self.gates))}],
return """Spec(
gates: [{}],
testcases: [
{"\n".join(testcases_string)}
{}
],
)"""
)""".format(
", ".join(map(lambda g: g.__name__, self.gates)),
"\n".join(testcases_string),
)


def make_spec(data: SpecData) -> Spec:
Expand Down

0 comments on commit 52a2f1d

Please sign in to comment.