From 947fbefa310e84508cf826b1b45758e2d2ef7c52 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 5 Aug 2026 17:11:33 +0100 Subject: [PATCH 1/2] Use prek action with autofix.ci --- .github/dependabot.yml | 5 +++++ .github/workflows/autofix.yml | 37 +++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 14 +++++------- .pre-commit-config.yaml | 41 ----------------------------------- 4 files changed, 48 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/autofix.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 610da79f8..13b3964d1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,3 +12,8 @@ updates: schedule: interval: daily open-pull-requests-limit: 10 + + - package-ecosystem: pre-commit + directory: / + schedule: + interval: daily diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 000000000..3e5ceda64 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,37 @@ +--- +name: autofix.ci + +on: + pull_request: + branches: [main] + push: + branches: [main] + +permissions: + contents: read + +jobs: + autofix: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + fetch-tags: true + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@v9.0.0 + + - name: Run fixers + uses: j178/prek-action@v3.0.0 + with: + prek-version: 0.4.11 + extra-args: >- + --all-files --hook-stage pre-commit --no-fail-fast --verbose + env: + UV_NO_CACHE: '1' + UV_PYTHON: 3.14 + + - uses: autofix-ci/action@v1.3.4 + if: always() diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3a0e1e1d9..a1c124821 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,17 +35,15 @@ jobs: cache-dependency-glob: '**/pyproject.toml' - name: Lint - # Use bash to ensure the step fails if any command fails. - # PowerShell does not fail on intermediate command failures by default. - shell: bash - run: uv run --extra=dev prek run --all-files --hook-stage ${{ matrix.hook-stage }} - --verbose + uses: j178/prek-action@v3.0.0 + with: + prek-version: 0.4.11 + extra-args: >- + --all-files --hook-stage ${{ matrix.hook-stage }} --verbose env: + UV_NO_CACHE: '1' UV_PYTHON: ${{ matrix.python-version }} - - uses: pre-commit-ci/lite-action@v1.1.0 - if: always() - completion-lint: needs: build runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 863357160..b2441e7b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,47 +6,6 @@ fail_fast: true # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks -ci: - # We use system Python, with required dependencies specified in pyproject.toml. - # We therefore cannot use those dependencies in pre-commit CI. - skip: - - actionlint - - sphinx-lint - - strict-kwargs-fix - - check-manifest - - deptry - - doc8 - - pydocstringformatter - - docs - - interrogate - - interrogate-docs - - linkcheck - - mypy - - mypy-docs - - pylint - - pyproject-fmt-fix - - pyright - - pyright-docs - - pyright-verifytypes - - ty - - ty-docs - - pyroma - - ruff-check-fix - - ruff-check-fix-docs - - ruff-format-fix - - ruff-format-fix-docs - - shellcheck - - shellcheck-docs - - shfmt - - shfmt-docs - - spelling - - vulture - - vulture-docs - - yamlfix - - zizmor - - pyrefly - - pyrefly-docs - default_install_hook_types: [pre-commit, pre-push] repos: From 0444aa6b5f27fe6379513b9af268d6181cee1399 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 5 Aug 2026 18:34:19 +0100 Subject: [PATCH 2/2] Retrigger checks after retiring pre-commit.ci