Skip to content

Commit 947fbef

Browse files
committed
Use prek action with autofix.ci
1 parent cbf9129 commit 947fbef

4 files changed

Lines changed: 48 additions & 49 deletions

File tree

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ updates:
1212
schedule:
1313
interval: daily
1414
open-pull-requests-limit: 10
15+
16+
- package-ecosystem: pre-commit
17+
directory: /
18+
schedule:
19+
interval: daily

.github/workflows/autofix.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: autofix.ci
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
push:
8+
branches: [main]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
autofix:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v7
18+
with:
19+
fetch-depth: 0
20+
fetch-tags: true
21+
persist-credentials: false
22+
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v9.0.0
25+
26+
- name: Run fixers
27+
uses: j178/prek-action@v3.0.0
28+
with:
29+
prek-version: 0.4.11
30+
extra-args: >-
31+
--all-files --hook-stage pre-commit --no-fail-fast --verbose
32+
env:
33+
UV_NO_CACHE: '1'
34+
UV_PYTHON: 3.14
35+
36+
- uses: autofix-ci/action@v1.3.4
37+
if: always()

.github/workflows/lint.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,15 @@ jobs:
3535
cache-dependency-glob: '**/pyproject.toml'
3636

3737
- name: Lint
38-
# Use bash to ensure the step fails if any command fails.
39-
# PowerShell does not fail on intermediate command failures by default.
40-
shell: bash
41-
run: uv run --extra=dev prek run --all-files --hook-stage ${{ matrix.hook-stage }}
42-
--verbose
38+
uses: j178/prek-action@v3.0.0
39+
with:
40+
prek-version: 0.4.11
41+
extra-args: >-
42+
--all-files --hook-stage ${{ matrix.hook-stage }} --verbose
4343
env:
44+
UV_NO_CACHE: '1'
4445
UV_PYTHON: ${{ matrix.python-version }}
4546

46-
- uses: pre-commit-ci/lite-action@v1.1.0
47-
if: always()
48-
4947
completion-lint:
5048
needs: build
5149
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,6 @@ fail_fast: true
66
# See https://pre-commit.com for more information
77
# See https://pre-commit.com/hooks.html for more hooks
88

9-
ci:
10-
# We use system Python, with required dependencies specified in pyproject.toml.
11-
# We therefore cannot use those dependencies in pre-commit CI.
12-
skip:
13-
- actionlint
14-
- sphinx-lint
15-
- strict-kwargs-fix
16-
- check-manifest
17-
- deptry
18-
- doc8
19-
- pydocstringformatter
20-
- docs
21-
- interrogate
22-
- interrogate-docs
23-
- linkcheck
24-
- mypy
25-
- mypy-docs
26-
- pylint
27-
- pyproject-fmt-fix
28-
- pyright
29-
- pyright-docs
30-
- pyright-verifytypes
31-
- ty
32-
- ty-docs
33-
- pyroma
34-
- ruff-check-fix
35-
- ruff-check-fix-docs
36-
- ruff-format-fix
37-
- ruff-format-fix-docs
38-
- shellcheck
39-
- shellcheck-docs
40-
- shfmt
41-
- shfmt-docs
42-
- spelling
43-
- vulture
44-
- vulture-docs
45-
- yamlfix
46-
- zizmor
47-
- pyrefly
48-
- pyrefly-docs
49-
509
default_install_hook_types: [pre-commit, pre-push]
5110

5211
repos:

0 commit comments

Comments
 (0)