-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
115 lines (103 loc) · 3.1 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
112
113
114
115
exclude: ^(scripts|example_repos)/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
- id: check-docstring-first
- id: check-yaml
- id: debug-statements
- id: name-tests-test
- id: requirements-txt-fixer
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
- id: check-json
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
- repo: local
hooks:
- id: autoflake
name: autoflake
entry: poetry run autoflake -r -i
args: [--remove-all-unused-imports, --remove-unused-variables]
language: system
types: [python]
stages: [commit, manual, push]
- id: isort
name: isort-format
language: system
entry: poetry run isort
args: [--settings-path=pyproject.toml]
types: [python]
stages: [commit, manual]
- id: isort-check
name: isort-lint
entry: poetry run isort
args: [--settings-path=pyproject.toml, --check-only]
language: system
types: [python]
stages: [push]
- id: black
name: black-format
entry: poetry run black src tests
args: [--config=pyproject.toml]
language: system
types: [python]
stages: [commit, manual]
- id: black-check
name: black-lint
entry: poetry run black src tests --check
args: [--config=pyproject.toml]
language: system
types: [python]
stages: [push]
- id: mypy
name: mypy
entry: poetry run mypy --install-types --non-interactive --show-error-codes --sqlite-cache src
args: [--config-file=pyproject.toml, --cache-dir=.mypy_cache]
language: system
pass_filenames: false
require_serial: false
verbose: true
types: [python]
stages: [commit, manual, push]
# - id: tryceratops
# name: tryceratops
# entry: poetry run tryceratops src
# args: [--autofix]
# language: system
# types: [python]
# stages: [commit, manual, push]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
types: [yaml]
exclude: ^(.*/)?\..*\.ya?ml$
args: [--write, --ignore-path=.prettierignore]
stages: [commit, manual, push]
- repo: https://github.com/gvanderest/pylama-pre-commit
rev: 0.1.2
hooks:
- id: pylama
name: pylama
args: [--verbose, --options=pylama.ini, --max-complexity=20, --concurrent]
stages: [commit, manual, push]
# - repo: https://github.com/RodrigoGonzalez/check-mkdocs
# rev: v1.2.0
# hooks:
# - id: check-mkdocs
# name: check-mkdocs
# stages: [commit, manual, push]
# - repo: https://github.com/asottile/setup-cfg-fmt
# rev: v2.4.0
# hooks:
# - id: setup-cfg-fmt