Skip to content

Commit

Permalink
🐛 Fix broken file path
Browse files Browse the repository at this point in the history
Co-authored-by: thierry-martinez <[email protected]>
  • Loading branch information
EarlMilktea and thierry-martinez authored Nov 27, 2024
1 parent 86d4e1e commit a84830d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphix/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ def to_qasm3(self, filename):
filename : str
file name to export to. example: "filename.qasm"
"""
with Path(filename + ".qasm", "w").open(encoding="utf-8") as file:
with Path(filename).with_suffix(".qasm").open("w", encoding="utf-8") as file:

Check warning on line 1528 in graphix/pattern.py

View check run for this annotation

Codecov / codecov/patch

graphix/pattern.py#L1528

Added line #L1528 was not covered by tests
file.write("// generated by graphix\n")
file.write("OPENQASM 3;\n")
file.write('include "stdgates.inc";\n')
Expand Down

0 comments on commit a84830d

Please sign in to comment.