-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
63 lines (54 loc) · 1.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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: ^test/cases/
- repo: local
hooks:
- id: cog
name: regenerate generated files (codegen)
language: system
entry: cog
args: [
-r, # replace input with output
-c, # include checksum
-P, # use 'print' for code output
-p, 'import subprocess as sp, re, os' # prelude
]
files: |
(?x)^
#[[[cog
# files = sp.check_output(['git', 'grep', '-l', '-F', '-e', '[[[' + 'cog'], text=True).splitlines()
# print('\n' + ' |\n'.join(map(re.escape, files)) + '\n')
#]]]
\.pre\-commit\-config\.yaml |
README\.md
#[[[end]]] (checksum: 74345a875646da6d800f7047edca64c2)
$
- id: pip-compile-multi
name: pip-compile-multi
language: system
entry: pip-compile-multi --no-upgrade --allow-unsafe
pass_filenames: false
files: ^requirements/
- id: ruff
name: ruff (linting)
language: system
entry: ruff check --fix
types: [python]
- id: mypy
name: mypy (type checking)
language: system
entry: mypy
types: [python]
- id: tests
name: tests
language: system
entry: python -m unittest
pass_filenames: false
files: '(?x)
\.py$ |
^test_cases/
'