-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
76 lines (69 loc) · 1.67 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: name-tests-test
name: Tests match 'test*.py'
args: ['--django']
exclude: ^(tests/performance_measures.py|tests/read_config.py|tests/.*params.py|.*get_simple_test_cases.py)
- id: detect-private-key
#
# FINDING & REMOVING UNUSED IMPORTS
#
- repo: https://github.com/hadialqattan/pycln
rev: v1.1.0
hooks:
- id: pycln
name: Remove unused imports
args: [--config=pyproject.toml]
#
# DOCSTRINGS FOLLOWING NUMPY CONVENTION
#
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
name: Docstrings (numpy convention)
additional_dependencies: [toml]
exclude: (?!test_).*\.py
#
# TYPING
#
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.790
hooks:
- id: mypy
name: Typing (mypy)
args: [--ignore-missing-imports]
#
# SORTING IMPORTS A LA BLACK
#
- repo: https://github.com/timothycrosley/isort
rev: 5.6.4
hooks:
- id: isort
name: isort (black config)
additional_dependencies: [toml]
#
# FORMATTING CODE WITH BLACK
#
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
#
# LINTING WITH FLAKE8
#
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]