File tree Expand file tree Collapse file tree 5 files changed +13
-17
lines changed
Expand file tree Collapse file tree 5 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -33,28 +33,22 @@ jobs:
3333 with :
3434 version : ${{ env.DEFAULT_UV_VERSION }}
3535 python-version : ${{ env.DEFAULT_PYTHON_VERSION }}
36- - name : Install Hatch & pre-commit
36+ - name : Install Hatch
3737 run : |
3838 uv tool install --python ${{ steps.setup-python.outputs.python-version }} --upgrade hatch
39- uv tool install --python ${{ steps.setup-python.outputs.python-version }} --upgrade pre-commit --with pre-commit-uv
4039 - name : Lint project
4140 run : |
4241 hatch fmt --check
4342 - name : Check project typing
4443 run : |
4544 hatch run typing:run
46- - uses : actions/cache@v4.3.0
47- with :
48- path : ~/.cache/pre-commit
49- key : pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
50- - name : Check files with pre-commit
51- run : |
52- pre-commit run --all-files --show-diff-on-failure --color=always
45+ - name : Check files with prek
46+ uses : j178/prek-action@v1.0.11
5347 - name : Validate the changelog
5448 uses : release-flow/keep-a-changelog-action@v3
5549 with :
5650 command : query
57- version : unreleased
51+ version : latest-or- unreleased
5852 tests :
5953 name : Test (Python ${{ matrix.python-version }})
6054 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 2121 # Both these are needed
2222 ncipollo/release-action : ref-pin
2323 release-flow/keep-a-changelog-action : ref-pin
24+ j178/prek-action : ref-pin
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919- Bumps actions/setup-python from 5.6.0 to 6.0.0
2020- Bumps actions/cache from 4.2.4 to 4.3.0
2121- Bumps ncipollo/release-action from 1.18.0 to 1.20.0
22+ - Transitions from pre-commit to prek
2223
2324### Fixed
2425
Original file line number Diff line number Diff line change @@ -37,13 +37,13 @@ If you've identified a bug:
3737 curl -LsSf https://astral.sh/uv/install.sh | sh # Install uv
3838 ```
39391. Install [` hatch` ](https://github.com/pypa/hatch) and
40- [` pre-commit` ](https://github.com/pre-commit/pre-commit)
40+ [` pre-commit` ](https://github.com/pre-commit/pre-commit) or [ ` prek ` ](https://github.com/j178/prek)
4141 ` ` ` bash
4242 uv tool install hatch pre-commit
4343 ` ` `
44441. Set up pre-commit hooks:
4545 ` ` ` bash
46- pre-commit install
46+ prek install
4747 ` ` `
4848
4949# # Code Style
Original file line number Diff line number Diff line change @@ -131,16 +131,16 @@ run = [
131131 " mypy --install-types --non-interactive ." ,
132132]
133133
134- [tool .hatch .envs .pre-commit ]
135- template = " pre-commit "
134+ [tool .hatch .envs .prek ]
135+ template = " prek "
136136detached = true
137137dependencies = [
138138 " pre-commit ~= 4.3" ,
139- " pre-commit-uv " ,
139+ " prek ~= 0.2.8 " ,
140140]
141141
142- [tool .hatch .envs .pre-commit .scripts ]
143- check = [ " pre-commit run --all-files" ]
142+ [tool .hatch .envs .prek .scripts ]
143+ check = [ " prek run --all-files" ]
144144update = [ " pre-commit autoupdate" ]
145145
146146[tool .hatch .envs .docs ]
You can’t perform that action at this time.
0 commit comments