-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
41 lines (38 loc) · 1.23 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
# pre-commit hooks require a user to have installed `pre-commit`:
# $ brew install pre-commit
# Then install the hooks within the repo:
# $ cd /PATH/TO/base-python3 (or whatever your package is located)
# $ pre-commit install
# You only need to run the `install` once per repo
# note that you can update the `sha` versions in this file automatically with the command
# `pre-commit autoupdate`
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.7
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
hooks:
- id: trailing-whitespace
# ensures files are either empty or end with a blank line
- id: end-of-file-fixer
# valid python file
- id: check-ast
# validates style (see setup.cfg for options)
- id: flake8
- repo: local
hooks:
- id: pytest
name: Check pytest unit tests pass
entry: pipenv run pytest
pass_filenames: false
language: system
types: [python]
- id: mypy
name: Check mypy static types match
entry: pipenv run mypy python_starter --ignore-missing-imports
pass_filenames: false
language: system
types: [python]