-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
93 lines (93 loc) · 2.77 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.9
node: 16.0.0
repos:
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
files: server
args:
- --application-directories
- server
- repo: https://github.com/psf/black
rev: 22.6.0 # Replace by any tag/version: https://github.com/psf/black/tags
hooks:
- id: black
language_version: python # Should be a command that runs python3.6+
types: [python]
- repo: https://github.com/pycqa/flake8
rev: 4.0.1 # pick a git hash / tag to point to
hooks:
- id: flake8
types: ["python"]
additional_dependencies:
[
"flake8-bugbear==22.3.20",
"flake8-commas==2.1.0",
"flake8-no-implicit-concat==0.3.3",
]
args:
[
"--max-line-length=120",
"--ignore=D203,W503,E203,C812,C813,C814,C815,C816,C819,F541",
"--exclude=**migrations/versions/*,**locust.py",
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
exclude: locust
args:
[
"--enable-error-code=ignore-without-code",
"--follow-imports=silent",
"--warn-no-return",
"--check-untyped-defs",
"--ignore-missing-imports",
"--no-strict-optional",
"--show-error-codes",
"--python-version=3.10",
"--install-types",
"--non-interactive",
]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
# Since pre-commit will explicitly pass files to isort, we need to duplicate our excluded
# files list here; the skip options in pyproject.toml are not respected
args:
- --profile=black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0 # Use the ref you want to point at
hooks:
- id: end-of-file-fixer
- id: check-case-conflict
- id: no-commit-to-branch
args:
- --branch
- release
- --branch
- main
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16 # Use the ref you want to point at
hooks:
- id: mdformat
# Optionally add plugins
additional_dependencies:
- mdformat-gfm
- mdformat-black
- mdformat-frontmatter
- mdformat-footnote
- repo: local
hooks:
- id: make-docs
stages: [manual]
name: make docs
entry: ./cli/scripts/make_docs
language: script
exclude: "/"
always_run: true