-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
71 lines (64 loc) · 1.99 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-xml
- id: forbid-new-submodules
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-merge-conflict
- id: no-commit-to-branch # blocks main commits. To bypass do git commit --allow-empty
- id: pretty-format-json
# For more information about isort, see https://pycqa.github.io/isort/docs/configuration/pre-commit.html
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
# For more information about mypy, see https://github.com/pre-commit/mirrors-mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910-1
hooks:
- id: mypy
exclude: ^(docs/|example-plugin/|tests/fixtures)
- repo: local
hooks:
- id: pytest
name: Check pytest unit tests pass
entry: poetry run test
pass_filenames: false
language: system
types: [python]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.2.0
hooks:
- id: pretty-format-toml
args: [--autofix]
- id: pretty-format-yaml
args: [--autofix]
exclude: .copier-answer.yml
# For more information about check-poetry, https://gitlab.com/smop/pre-commit-hooks/-/blob/master/.pre-commit-hooks.yaml
- repo: local
hooks:
- id: check-poetry
name: Poetry check
description: Validates the structure of the pyproject.toml file
entry: poetry check
language: system
pass_filenames: false
files: pyproject.toml
# For more information about YAPF, see https://github.com/google/yapf
- repo: https://github.com/craig8/mirrors-yapf
rev: b84f670025671a341d0afd2b06b877b195d65c0f # Use the sha / tag you want to point at
hooks:
- id: yapf
name: yapf
description: "A formatter for Python files."
entry: yapf
language: python
types: [ python ]