From 2ec73c6918bd5f53eea01d27839aff272b132588 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 6 May 2020 12:32:19 +0100 Subject: [PATCH] test: pre-commit: add isort Compatible with black (see https://github.com/timothycrosley/isort/issues/694) --- .pre-commit-config.yaml | 5 +++++ setup.cfg | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc115d836d..2696d3d9e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,6 +4,11 @@ repos: language_version: python3 repo: https://github.com/ambv/black rev: 19.10b0 +- hooks: + - id: isort + language_version: python3 + repo: https://github.com/timothycrosley/isort + rev: 4.3.21 - hooks: - id: flake8 language_version: python3 diff --git a/setup.cfg b/setup.cfg index d34c87d4fb..9b6942bc35 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,3 +8,8 @@ ignore= W503, # Line break occurred before a binary operator max_line_length=79 select=B,C,E,F,W,T4,B9 + +[isort] +line_length=79 +include_trailing_comma=true +multi_line_output=3