-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
69 lines (68 loc) · 1.57 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: end-of-file-fixer
name: fix eofs
exclude: "^\\.version$"
- id: mixed-line-ending
name: fix line endings
- id: trailing-whitespace
name: remove trailing whitespace
- repo: local
hooks:
- id: black
name: blacken code
entry: poetry run black
language: system
types: [python]
- id: isort
name: sort python imports
entry: poetry run isort
language: system
types: [python]
- id: pylint
name: lint python files
entry: poetry run pylint
language: system
types: [python]
- id: flake8
name: style check python files
entry: poetry run flake8
language: system
types: [python]
- id: mypy
name: type check python files
entry: poetry run mypy .
language: system
types: [python]
pass_filenames: false
- id: pydocstyle
name: lint python docstrings
entry: poetry run pydocstyle
language: system
types: [python]
- id: commitlint
name: lint commit message
language: system
entry: "npx commitlint -e"
always_run: true
stages: [commit-msg]
- id: test
name: run unittests
language: system
entry: "pipx run tox run -v"
types: [python]
pass_filenames: false
- id: docs
name: build docs with sphinx
language: system
files: ".*\\.py|docs/make\\.sh"
exclude: "tests/.*\\.py"
entry: poetry run docs/make.sh
pass_filenames: false
- id: cspell
name: spell check docs
language: system
files: "docs/.*\\.md"
entry: "npx cspell"