-
Notifications
You must be signed in to change notification settings - Fork 8
/
.pre-commit-config.yaml
38 lines (38 loc) · 1.05 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
repos:
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
stages: [commit]
exclude: '(migrations|alembic|docs)/.*'
- repo: local
hooks:
- id: pytest
name: pytest
language: system
entry: pytest -v -s --cov --cov-fail-under=100
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|alembic)' --explicit-package-bases ./"
language: python
# 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
pass_filenames: false