Add black and isort to precommit

E203 is *not* pep8 compliant, pylint.
This commit is contained in:
Wayne Werner 2020-02-04 13:59:56 -06:00
parent cdca5aafe0
commit c1baa329c6
No known key found for this signature in database
GPG key ID: C36D3A8D5BEF0935
4 changed files with 26 additions and 1 deletions

7
.isort.cfg Normal file
View file

@ -0,0 +1,7 @@
[settings]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
line_length=88
ensure_newline_before_comments=True
use_parentheses=True

View file

@ -416,6 +416,16 @@ repos:
- --py-version=3.7
- --platform=linux
- repo: https://github.com/timothycrosley/isort
rev: '1e78a9acf3110e1f9721feb591f89a451fc9876a'
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3.7
- repo: https://github.com/saltstack/salt-nox-pre-commit
rev: master

View file

@ -12,7 +12,7 @@ ignore=CVS,
# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns=
ignore-patterns=salt.ext.*
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
@ -77,6 +77,7 @@ disable=R,
no-member,
unsubscriptable-object,
un-indexed-curly-braces-error,
whitespace-before-colon,
indentation-is-not-a-multiple-of-four-comment,
blacklisted-name,
invalid-name,
@ -126,6 +127,7 @@ disable=R,
str-format-in-logging,
import-outside-toplevel,
deprecated-method,
repr-flag-used-in-string,
keyword-arg-before-vararg
# Enable the message, report, category or checker with the given id(s). You can

6
pyproject.toml Normal file
View file

@ -0,0 +1,6 @@
[tool.black]
exclude= '''
\(
salt/ext
| tests/kitchen
)/