-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
72 lines (72 loc) · 1.61 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
repos:
# AUTOFLAKE
- hooks:
- id: autoflake
args:
- --in-place
- --remove-unused-variables
- --remove-all-unused-imports
repo: https://github.com/myint/autoflake
rev: ''
# BLACK- id: autoflake
- hooks:
- id: black
language_version: python3
args:
- --line-length=80
repo: https://github.com/psf/black
rev: 20.8b1
# DOCFORMATTER
- hooks:
- id: docformatter
args:
- -i
- -r
- --pre-summary-newline
- --make-summary-multi-line
repo: https://github.com/myint/docformatter
rev: ''
# ISORT
- hooks:
- id: isort
args:
- --profile=black
- --line-length=80
repo: https://github.com/pycqa/isort
rev: ''
# LOCAL HOOKS
- repo: local
hooks:
- id: mypy
name: mypy
language: system
entry: .venv/bin/mypy
args:
- --config-file=mypy.ini
exclude: tests
types:
- python
files: pulp_lparray
# pytest
- id: pytest
name: pytest
language: system
entry: /usr/bin/pytest
args:
- tests
pass_filenames: false
types:
- python
# version bump
- id: autoversion
name: autoversion
entry: /usr/bin/bash
language: system
args:
- -c
- >
sed -ri -e "s/(__version__ = .[0-9]+\.[0-9]+\.)[0-9]+/\1$(date +%Y%m%d%H%M%S)/g" setup.py
&& git add setup.py
pass_filenames: false
types:
- python