This repository has been archived by the owner on Sep 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
81 lines (81 loc) · 2.34 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
repos:
# pre-commit hooks for testing the files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
- id: check-json
- id: check-xml
- id: end-of-file-fixer
exclude: \.json$
files: \.py$
- id: trailing-whitespace
- id: mixed-line-ending
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.29.0
hooks:
- id: commitizen
stages: [commit-msg]
# for formatting
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
args: ["--line-length=100"]
language_version: python3
# for linting & style checks
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
hooks:
- id: ruff
args: ["--fix"]
# for keeping dependencies up-to-date
- repo: https://github.com/jazzband/pip-tools
rev: 7.4.1
hooks:
- id: pip-compile
name: pip-compile requirements.txt
args:
[
-q,
--resolver=backtracking,
--generate-hashes,
requirements/requirements.in,
--output-file=requirements/requirements.txt,
]
files: ^requirements/requirements\.(in|txt)$
- id: pip-compile
name: pip-compile pip-requirements.txt
args:
[
-q,
--resolver=backtracking,
--generate-hashes,
requirements/requirements.in,
--output-file=requirements/pip-requirements.txt,
]
files: ^requirements/(requirements\.in|pip-requirements\.txt)$
- id: pip-compile
name: pip-compile constraints.txt
args:
[
-q,
--resolver=backtracking,
--strip-extras,
requirements/requirements.in,
--output-file=requirements/constraints.txt,
]
files: ^requirements/(requirements\.in|constraints\.txt)$
- id: pip-compile
name: pip-compile requirements-dev.txt
args:
[
-q,
--resolver=backtracking,
--generate-hashes,
requirements/requirements-dev.in,
--output-file=requirements/requirements-dev.txt,
]
files: ^requirements/requirements-dev\.(in|txt)$