From 7476456e46e895165b2b72debc67f7e7b8745bfe Mon Sep 17 00:00:00 2001 From: Emmanuelle Vargas-Gonzalez Date: Fri, 13 Jul 2018 10:37:53 -0400 Subject: [PATCH] Update isort.cfg and .pre-commit-config.yaml Adds 'add trailing commas' hook and changes isort to not re-write each other --- .isort.cfg | 2 ++ .pre-commit-config.yaml | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.isort.cfg b/.isort.cfg index 0780dcd5..ffbe7868 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -14,3 +14,5 @@ known_third_party = taxii2client, known_first_party = stix2 force_sort_within_sections = 1 +multi_line_output = 5 +include_trailing_comma = True diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 742cbb28..7620c35a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,16 @@ +repos: - repo: https://github.com/pre-commit/pre-commit-hooks - sha: v0.9.4 + rev: v1.3.0 hooks: - id: trailing-whitespace - id: flake8 args: - --max-line-length=160 - id: check-merge-conflict +- repo: https://github.com/asottile/add-trailing-comma + rev: v0.6.4 + hooks: + - id: add-trailing-comma - repo: https://github.com/FalconSocial/pre-commit-python-sorter sha: b57843b0b874df1d16eb0bef00b868792cb245c2 hooks: