Skip to content

Commit ace125b

Browse files
committed
Update some files.
1 parent 5ee1b85 commit ace125b

2 files changed

Lines changed: 7 additions & 42 deletions

File tree

.github/workflows/lint-and-format.yml

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,66 +16,34 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
2020
with:
2121
persist-credentials: false
22-
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
22+
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae
2323
with:
24-
path: |
25-
~/.cache/prek
26-
~/.cache/kingfisher
24+
path: ~/.cache/prek
2725
key: ${{ runner.os }}-${{ runner.arch }}-prek-${{ hashFiles('.pre-commit-config.yaml') }}
2826
restore-keys: |
2927
${{ runner.os }}-${{ runner.arch }}-prek-
3028
- name: Setup Python
31-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
29+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
3230
with:
3331
python-version: '3.14'
34-
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
32+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
3533
with:
3634
version: 0.11.12
37-
- name: detect method
38-
id: detect
39-
run: |
40-
if test -f requirements-lint.txt ; then
41-
echo "method=requirements" >> "$GITHUB_OUTPUT"
42-
elif test -f pyproject.toml && grep -q dependency-groups pyproject.toml ; then
43-
echo "method=pep735" >> "$GITHUB_OUTPUT"
44-
else
45-
echo "method=uvx" >> "$GITHUB_OUTPUT"
46-
fi
47-
- name: pre-commit (PEP 735)
48-
if: steps.detect.outputs.method == 'pep735'
35+
- name: pre-commit
4936
run: |
5037
uv run --only-group pre-commit prek run --all-files --show-diff-on-failure
5138
uv run --only-group pre-commit prek cache gc
5239
env:
5340
RUFF_OUTPUT_FORMAT: github
5441
REUSE_OUTPUT_FORMAT: github
5542
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
- name: pre-commit (uvx)
57-
if: steps.detect.outputs.method == 'uvx'
58-
run: |
59-
uvx prek run --all-files --show-diff-on-failure
60-
uvx prek cache gc
61-
env:
62-
RUFF_OUTPUT_FORMAT: github
63-
REUSE_OUTPUT_FORMAT: github
64-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65-
- name: pre-commit (requirements)
66-
if: steps.detect.outputs.method == 'requirements'
67-
run: |
68-
uv pip install --system -r requirements-lint.txt
69-
prek run --all-files --show-diff-on-failure
70-
prek cache gc
71-
env:
72-
RUFF_OUTPUT_FORMAT: github
73-
REUSE_OUTPUT_FORMAT: github
74-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7543
- name: diff
7644
run: git diff
7745
if: always()
78-
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
46+
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43
7947
if: always()
8048
with:
8149
msg: 'chore(pre-commit): apply code formatting'

.pre-commit-config.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ repos:
1010
hooks:
1111
- id: trailing-whitespace
1212
- id: end-of-file-fixer
13-
- id: check-yaml
14-
- id: check-toml
1513
- id: check-merge-conflict
1614
- id: mixed-line-ending
1715
args: [--fix=lf]
@@ -42,7 +40,6 @@ repos:
4240
rev: v6.2.0
4341
hooks:
4442
- id: reuse
45-
4643
- repo: https://github.com/rhysd/actionlint
4744
rev: v1.7.12
4845
hooks:

0 commit comments

Comments
 (0)