forked from ViacheslavDanilov/generative_design
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
63 lines (56 loc) · 1.37 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
# pre-commit hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-ast
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
- id: double-quote-string-fixer
# trailing comma fixer
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
hooks:
- id: add-trailing-comma
# black formatter
- repo: https://github.com/ambv/black
rev: 23.1.0
hooks:
- id: black
args: [--config, pyproject.toml]
# yaml formatter
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.6.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2', --preserve-quotes]
# import cleaner
- repo: https://github.com/hadialqattan/pycln
rev: v2.1.3
hooks:
- id: pycln
args: [--config, pyproject.toml]
# import sorter
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
files: \.(py)$
args: [--settings-path, pyproject.toml]
# docstring style checker
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies: [toml, tomli]
args: [--config, pyproject.toml]
# static type checker
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
args: [--config-file, pyproject.toml]