From 51a75c514816ac1c63c01b9f4b69ba3a1ad81835 Mon Sep 17 00:00:00 2001 From: vil02 Date: Fri, 12 Jan 2024 18:49:12 +0100 Subject: [PATCH 1/8] style: use proper indentation in `ruff.yml` --- .github/workflows/ruff.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 496f1460e074..9ebabed3600a 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -11,6 +11,6 @@ jobs: ruff: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - run: pip install --user ruff - - run: ruff --output-format=github . + - uses: actions/checkout@v4 + - run: pip install --user ruff + - run: ruff --output-format=github . From 880ed299b67147782cbe93bd7b0dcfc32a258e9e Mon Sep 17 00:00:00 2001 From: vil02 Date: Sat, 13 Jan 2024 09:55:47 +0100 Subject: [PATCH 2/8] chore: run `prettier` on `yml` files --- .pre-commit-config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e06ba7a5250..aaf18bbe563d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -59,3 +59,9 @@ repos: - --install-types # See mirrors-mypy README.md - --non-interactive additional_dependencies: [types-requests] + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: 'v3.1.0' + hooks: + - id: prettier + types: [yaml] From 3dc59269c2f0328cac870ad584ff09aa7b85257d Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 13 Jan 2024 10:01:33 +0100 Subject: [PATCH 3/8] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aaf18bbe563d..671da14f838c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -64,4 +64,4 @@ repos: rev: 'v3.1.0' hooks: - id: prettier - types: [yaml] + types: [toml, yaml] From 8f2546111e33dd36bc474690cc0bf9e717bc32ff Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 13 Jan 2024 10:14:28 +0100 Subject: [PATCH 4/8] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 671da14f838c..ca4f4787c6a8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -64,4 +64,8 @@ repos: rev: 'v3.1.0' hooks: - id: prettier - types: [toml, yaml] + types_or: [toml, yaml] + exclude: | + (?x)^( + .github/workflows/*.yml + )$ From c936d74e511a430fe6d7c8bd257616db283fbe82 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 13 Jan 2024 10:50:43 +0100 Subject: [PATCH 5/8] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ca4f4787c6a8..1a7ce5e74e94 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,5 +67,5 @@ repos: types_or: [toml, yaml] exclude: | (?x)^( - .github/workflows/*.yml + \.github/workflows/(build|directory_writer|ruff).yml )$ From d0f5aff52bbe40a5eff6ebd479067b8cae6d77a4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 13 Jan 2024 09:51:13 +0000 Subject: [PATCH 6/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1a7ce5e74e94..8f32f59ecd8f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - repo: https://github.com/MarcoGorelli/auto-walrus rev: v0.2.2 hooks: - - id: auto-walrus + - id: auto-walrus - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.1.11 @@ -61,11 +61,11 @@ repos: additional_dependencies: [types-requests] - repo: https://github.com/pre-commit/mirrors-prettier - rev: 'v3.1.0' + rev: "v3.1.0" hooks: - id: prettier types_or: [toml, yaml] exclude: | - (?x)^( - \.github/workflows/(build|directory_writer|ruff).yml - )$ + (?x)^( + \.github/workflows/(build|directory_writer|ruff).yml + )$ From 2ae66155dea4742128fa95210d1cbe19110e261d Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 13 Jan 2024 10:52:37 +0100 Subject: [PATCH 7/8] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f32f59ecd8f..4877b0b9efd0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,5 +67,5 @@ repos: types_or: [toml, yaml] exclude: | (?x)^( - \.github/workflows/(build|directory_writer|ruff).yml + \.github/workflows/(build|directory_writer|project_euler|ruff).yml )$ From 9149670e5676279f3e97bd781f1b90d94174af6e Mon Sep 17 00:00:00 2001 From: vil02 Date: Sat, 13 Jan 2024 11:45:16 +0100 Subject: [PATCH 8/8] chore: run prettier on workflow files --- .github/workflows/build.yml | 10 +++++----- .pre-commit-config.yaml | 4 ---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1631feb2ba06..906edfdae1ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,10 +25,10 @@ jobs: - name: Run tests # TODO: #8818 Re-enable quantum tests run: pytest - --ignore=quantum/q_fourier_transform.py - --ignore=project_euler/ - --ignore=scripts/validate_solutions.py - --cov-report=term-missing:skip-covered - --cov=. . + --ignore=quantum/q_fourier_transform.py + --ignore=project_euler/ + --ignore=scripts/validate_solutions.py + --cov-report=term-missing:skip-covered + --cov=. . - if: ${{ success() }} run: scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4877b0b9efd0..31e141049441 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -65,7 +65,3 @@ repos: hooks: - id: prettier types_or: [toml, yaml] - exclude: | - (?x)^( - \.github/workflows/(build|directory_writer|project_euler|ruff).yml - )$