From a1e8dee019b58ee4057b59524eb12a4c1158b951 Mon Sep 17 00:00:00 2001 From: Patrick Arminio Date: Thu, 18 Oct 2018 14:16:56 -0700 Subject: [PATCH] Add precommit and isort --- .isort.cfg | 2 ++ .pre-commit-config.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .isort.cfg create mode 100644 .pre-commit-config.yaml diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000..d4ed37b --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,2 @@ +[settings] +known_third_party = aniso8601,graphql,graphql_relay,promise,pytest,pytz,pyutils,setuptools,six,snapshottest,sphinx_graphene_theme diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..09339de --- /dev/null +++ b/.pre-commit-config.yaml @@ -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