-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
104 lines (91 loc) · 2.5 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
---
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
# We re-set the `stages` setting because pre-commit-hooks over-rides it
# otherwise.
# See https://github.com/pre-commit/pre-commit-hooks/issues/515
- id: end-of-file-fixer
stages: [commit]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
stages: [commit]
- id: check-executables-have-shebangs
stages: [commit]
- id: mixed-line-ending
args: [--fix=lf]
- id: check-added-large-files
- id: check-merge-conflict
- id: detect-private-key
- id: check-docstring-first
- id: check-toml
- id: check-yaml
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0 # Use the ref you want to point at
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-check-mock-methods
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/PyCQA/doc8
rev: v1.1.1
hooks:
- id: doc8
- repo: local
hooks:
- id: pytest
name: run all tests
stages: [push]
language: system
entry: poetry run pytest --full-trace
- id: pyproject.toml
name: validate pyproject.toml
language: system
entry: poetry check
files: 'pyproject\.toml'
pass_filenames: false
- id: poetry-lock
name: poetry-lock
stages: [post-commit, post-merge]
language: system
entry: poetry install
files: 'poetry\.lock'
pass_filenames: false
verbose: true
# - id: deal lint
# name: deal lint
# language: system
# entry: poetry run python3 -m deal lint
# types: [python]
- id: isort
name: isort
language: system
entry: poetry run isort
types: [python]
- id: black
name: black
language: system
entry: poetry run black
types: [python]
- id: flake8
name: flake8
language: system
entry: poetry run flake8
types: [python]
- id: shellcheck
name: shellcheck
language: system
entry: shellcheck
types: [shell]
- id: mypy
name: mypy
language: system
entry: poetry run mypy
types: [python]