-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
38 lines (38 loc) · 1002 Bytes
/
.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
repos:
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
stages: [commit]
- repo: local
hooks:
- id: pytest
name: pytest
language: system
entry: pytest -v -s
always_run: true
pass_filenames: false
stages: [commit]
- repo: local
hooks:
- id: requirements
name: requirements
entry: bash -c 'pip3 freeze > requirements.txt; git add requirements.txt'
language: system
pass_filenames: false
stages: [commit]
- repo: local
hooks:
- id: mypy
name: mypy
entry: "mypy --exclude '(docs|venv)' ./ "
language: system
pass_filenames: false
# trigger for commits changing Python files
types: [python]
# use require_serial so that script
# is only called once per commit
require_serial: true
# print the number of files as a sanity-check
verbose: true
exclude: 'docs/.*|venv/.*'