-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
111 lines (111 loc) · 2.73 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
default_language_version:
python: python3.12
default_stages:
- "pre-push"
- "pre-commit"
- "manual"
repos:
- repo: local
hooks:
- id: poetry lock and update
name: poetry lock and update
entry: "poetry"
args: ["update", "--with=test", "--sync"]
language: system
types: [python]
pass_filenames: false
always_run: true
stages:
- "pre-push"
- "manual"
- id: pytest
name: pytest
entry: "./.venv/bin/pytest"
args:
- "tests/units"
- "--cov=src"
- "--cov-report=lcov:build/coverage.lcov"
- "--junitxml=build/junit.xml"
language: system
types: [python]
pass_filenames: false
always_run: true
stages:
- "pre-push"
- "pre-commit"
- "manual"
- id: mypy
name: mypy
entry: "./.venv/bin/mypy"
language: system
types: [python]
pass_filenames: false
always_run: true
stages:
- "pre-push"
- "manual"
- id: ruff
name: ruff
language: system
entry: "./.venv/bin/ruff"
types: [python]
pass_filenames: false
args: ["check", "src", "tests", "--fix"]
stages:
- "pre-push"
- "pre-commit"
- "manual"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
stages:
- "pre-push"
- "pre-commit"
- "manual"
- id: end-of-file-fixer
stages:
- "pre-push"
- "pre-commit"
- "manual"
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
stages:
- "pre-push"
- "pre-commit"
- "manual"
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
stages:
- "pre-push"
- "pre-commit"
- "manual"
- repo: https://github.com/pylint-dev/pylint
rev: v3.2.2
hooks:
- id: pylint
name: pylint
entry: "./.venv/bin/pylint"
language: system
types: [python]
# Not that problematic to run in parallel see Pre-commit
# integration in the doc for details
# require_serial: true
args: ["-rn", "-sn", "--rcfile=pylintrc", "--fail-on=I", "-j=4"]
stages:
- "pre-push"
- "manual"
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: ["--py312-plus", "--keep-runtime-typing"]
stages:
- "pre-push"
- "pre-commit"
- "manual"