|
1 | 1 | default_install_hook_types: [ |
2 | | - pre-commit, pre-merge-commit, pre-push, |
3 | | - post-checkout, post-commit] |
4 | | -default_stages: [pre-commit, pre-merge-commit, pre-push, manual] |
| 2 | + pre-commit, |
| 3 | + post-checkout, post-merge, post-rewrite, post-commit] |
| 4 | +default_stages: [pre-commit, manual] |
5 | 5 | exclude: (^tests/.*/.*$) |
6 | 6 | repos: |
7 | 7 | - repo: https://github.com/pre-commit/pre-commit-hooks |
8 | | - rev: v4.6.0 |
| 8 | + rev: v5.0.0 |
9 | 9 | hooks: |
10 | 10 | - id: check-yaml |
11 | 11 | - id: end-of-file-fixer |
12 | 12 | - id: trailing-whitespace |
13 | 13 |
|
| 14 | +- repo: https://github.com/astral-sh/uv-pre-commit |
| 15 | + rev: 0.8.2 |
| 16 | + hooks: |
| 17 | + - id: uv-sync |
| 18 | + stages: [pre-commit, post-checkout, post-merge, post-rewrite, manual] |
| 19 | + |
| 20 | +- repo: https://github.com/astral-sh/uv-pre-commit |
| 21 | + rev: 0.8.2 |
| 22 | + hooks: |
| 23 | + - id: uv-lock |
| 24 | + - id: uv-export |
| 25 | + |
14 | 26 | - repo: local |
15 | 27 | hooks: |
16 | 28 | - id: static-checks |
17 | 29 | name: static-checks |
| 30 | + stages: [pre-commit, pre-push, manual] |
18 | 31 | description: >- |
19 | 32 | This hook runs all static checks, including mypy, and ruff. |
20 | 33 | It is recommended to run this on pre-commit and pre-push. |
21 | | - Will also sync and update the uv.lock file before commit. |
22 | 34 | always_run: true |
23 | 35 | language: python |
24 | 36 | entry: uv run tox -m static |
|
28 | 40 | description: >- |
29 | 41 | This hook uses the hatch-vcs module to update the `_version.py` file. |
30 | 42 | Call this on post-commit and post-checkout. |
31 | | - stages: [post-commit, post-checkout, manual] |
| 43 | + stages: [post-commit, post-checkout, post-merge, post-rewrite, manual] |
32 | 44 | always_run: true |
33 | 45 | language: python |
34 | 46 | pass_filenames: false |
|
0 commit comments