Add precommit and isort

This commit is contained in:
Patrick Arminio 2018-10-18 14:16:56 -07:00
parent f76f38ef30
commit a1e8dee019
No known key found for this signature in database
GPG Key ID: 6F384394A3714144
2 changed files with 26 additions and 0 deletions

2
.isort.cfg Normal file
View File

@ -0,0 +1,2 @@
[settings]
known_third_party = aniso8601,graphql,graphql_relay,promise,pytest,pytz,pyutils,setuptools,six,snapshottest,sphinx_graphene_theme

24
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,24 @@
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v1.3.0
hooks:
- id: check-json
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude: ^docs/.*$
- id: trailing-whitespace
exclude: README.md
- id: pretty-format-json
args:
- --autofix
- id: flake8
- repo: https://github.com/asottile/pyupgrade
rev: v1.4.0
hooks:
- id: pyupgrade
- repo: https://github.com/ambv/black
rev: 18.6b4
hooks:
- id: black
language_version: python3