From dda70a32138ce6098a98faee239045291377c3de Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 17:32:14 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E2=AC=86=EF=B8=8F=F0=9F=AA=9D=20update=20p?= =?UTF-8?q?re-commit=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.6 → v0.1.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.6...v0.1.7) - [github.com/pre-commit/mirrors-prettier: v3.1.0 → v4.0.0-alpha.4](https://github.com/pre-commit/mirrors-prettier/compare/v3.1.0...v4.0.0-alpha.4) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1cbaa4b23..df57fc49f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,7 +51,7 @@ repos: # Python linting using ruff - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.6 + rev: v0.1.7 hooks: - id: ruff args: ["--fix", "--show-fixes"] @@ -104,7 +104,7 @@ repos: # Format configuration files with prettier - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.1.0 + rev: v4.0.0-alpha.4 hooks: - id: prettier types_or: [yaml, markdown, html, css, scss, javascript, json] From 5d4319a86e6cb81d19f447f53f8c58b3249a8405 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 17:33:54 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=8E=A8=20pre-commit=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/python/test_subarchitectures.py | 80 +++++++++++++--------------- 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/test/python/test_subarchitectures.py b/test/python/test_subarchitectures.py index 116181547..309856c70 100644 --- a/test/python/test_subarchitectures.py +++ b/test/python/test_subarchitectures.py @@ -27,53 +27,49 @@ @pytest.fixture() def ibm_guadalupe() -> SubarchitectureOrder: """Return the SubarchitectureOrder for the IBM Guadalupe architecture.""" - return SubarchitectureOrder.from_coupling_map( - [ - (0, 1), - (1, 2), - (2, 3), - (3, 5), - (1, 4), - (5, 8), - (4, 7), - (6, 7), - (8, 9), - (7, 10), - (8, 11), - (10, 12), - (12, 15), - (12, 13), - (13, 14), - (11, 14), - ] - ) + return SubarchitectureOrder.from_coupling_map([ + (0, 1), + (1, 2), + (2, 3), + (3, 5), + (1, 4), + (5, 8), + (4, 7), + (6, 7), + (8, 9), + (7, 10), + (8, 11), + (10, 12), + (12, 15), + (12, 13), + (13, 14), + (11, 14), + ]) @pytest.fixture() def rigetti16() -> SubarchitectureOrder: """Return the SubarchitectureOrder for the Rigetti 16Q architecture.""" - return SubarchitectureOrder.from_coupling_map( - [ - (0, 1), - (1, 2), - (2, 3), - (3, 4), - (4, 5), - (5, 6), - (6, 7), - (7, 8), - (8, 9), - (9, 10), - (10, 11), - (11, 12), - (12, 13), - (13, 14), - (14, 15), - (0, 15), - (3, 12), - (4, 11), - ] - ) + return SubarchitectureOrder.from_coupling_map([ + (0, 1), + (1, 2), + (2, 3), + (3, 4), + (4, 5), + (5, 6), + (6, 7), + (7, 8), + (8, 9), + (9, 10), + (10, 11), + (11, 12), + (12, 13), + (13, 14), + (14, 15), + (0, 15), + (3, 12), + (4, 11), + ]) @pytest.fixture() From f4f225d9d65b9543c5ffc720a011e3ce642e6e65 Mon Sep 17 00:00:00 2001 From: burgholzer Date: Mon, 11 Dec 2023 18:51:13 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=94=A7=20update=20ruff=20configuratio?= =?UTF-8?q?n=20for=20PLR=20checks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 06a02ad2f..4e3d40beb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -219,11 +219,7 @@ extend-ignore = [ "ANN101", # Missing type annotation for `self` in method "ANN102", # Missing type annotation for `cls` in classmethod "ISC001", # Conflicts with formatter - "PLR0904", # Too many public methods - "PLR0911", # Too many return statements - "PLR0912", # Too many branches - "PLR0913", # Too many arguments - "PLR0915", # Too many local statements + "PLR09", # Too many <...> "PLR2004", # Magic value used in comparison "PLC0415", # Import should be at top of file "PT004", # Incorrect, just usefixtures instead.