-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-config.yaml
40 lines (39 loc) · 1.1 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
repos:
- repo: local
hooks:
- id: api-gen
name: api_gen
entry: |
bash shell/api_gen.sh
git status
clean=$(git status | grep "nothing to commit")
if [ -z "$clean" ]; then
echo "Please run shell/api_gen.sh to generate API."
exit 1
fi
language: system
stages: [pre-commit, manual]
require_serial: true
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
hooks:
- id: ruff
args: [--config, pyproject.toml, --fix, .]
stages: [pre-commit]
- id: ruff-format
args: [--config, pyproject.toml, .]
stages: [pre-commit]
- id: ruff
args: [--config, pyproject.toml, .]
stages: [manual]
- id: ruff-format
args: ["--check", --config, pyproject.toml, .]
stages: [manual]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
args: [--config-file=pyproject.toml, .]
language: system
pass_filenames: false
stages: [pre-commit, manual]