From 8933f12c4722e2ab176d849b9093076ab5dfe8af Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 25 Jan 2025 02:20:45 +0000 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=F0=9F=AA=9D=20Update=20pre-c?= =?UTF-8?q?ommit=20hook=20astral-sh/ruff-pre-commit=20to=20v0.9.3=20(#540)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [astral-sh/ruff-pre-commit](https://redirect.github.com/astral-sh/ruff-pre-commit) | repository | patch | `v0.9.2` -> `v0.9.3` | Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://redirect.github.com/renovatebot/renovate/discussions/new) if you have any questions. --- ### Release Notes
astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit) ### [`v0.9.3`](https://redirect.github.com/astral-sh/ruff-pre-commit/releases/tag/v0.9.3) [Compare Source](https://redirect.github.com/astral-sh/ruff-pre-commit/compare/v0.9.2...v0.9.3) See: https://github.com/astral-sh/ruff/releases/tag/0.9.3
--- ### Configuration 📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/cda-tum/mqt-qcec). --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- src/mqt/qcec/compilation_flow_profiles.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 52b43378..1a936bbf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: # Python linting and formatting using ruff - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.2 + rev: v0.9.3 hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/src/mqt/qcec/compilation_flow_profiles.py b/src/mqt/qcec/compilation_flow_profiles.py index 03e401f3..911f552c 100644 --- a/src/mqt/qcec/compilation_flow_profiles.py +++ b/src/mqt/qcec/compilation_flow_profiles.py @@ -301,8 +301,7 @@ def write_profile_data_to_file(profile_data: dict[tuple[str, int], int], filenam """Write the profile data to a file.""" with Path(filename).open("w+", encoding="utf-8") as f: f.write(f"# {filename}, Qiskit version: {qiskit_version}\n") - for (gate, controls), cost in profile_data.items(): - f.write(f"{gate} {controls} {cost}\n") + f.writelines(f"{gate} {controls} {cost}\n" for (gate, controls), cost in profile_data.items()) def check_recurrence(seq: list[int], order: int = 2) -> list[int] | None: