-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.pre-commit-config.yaml
45 lines (42 loc) · 1.25 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
default_language_version:
python: python3
exclude: (^docs/|^docs_source)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- repo: https://github.com/terrencepreilly/darglint
rev: v1.8.1
hooks:
- id: darglint # default config comes from tox.ini
args: [-v, '2']
- repo: local
hooks:
- id: black
name: black
entry: python -m black
args: [--skip-string-normalization, --config, ./pyproject.toml]
language: system
types: [python]
- id: flake8
name: flake8
entry: python -m flake8
language: system
types: [python]
- id: mypy # default config comes from setup.cfg
name: mypy
entry: python -m mypy
language: system
types: [python]
exclude: "docs/|tests/|example-plugin/" # exclude all test files form type checking
- id: docstr-coverage
name: docstr-coverage
entry: docstr-coverage
types: [python]
exclude: "test_.*"
language: system
args: [--fail-under, '0'] # fail if less than 50 of code has docstrings
log_file: docstring-coverage.txt