mirror of
https://github.com/saltstack/salt.git
synced 2025-04-15 17:20:19 +00:00
Add black and isort to precommit
E203 is *not* pep8 compliant, pylint.
This commit is contained in:
parent
cdca5aafe0
commit
c1baa329c6
4 changed files with 26 additions and 1 deletions
7
.isort.cfg
Normal file
7
.isort.cfg
Normal 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
|
|
@ -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
|
||||
|
|
|
@ -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
6
pyproject.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
[tool.black]
|
||||
exclude= '''
|
||||
\(
|
||||
salt/ext
|
||||
| tests/kitchen
|
||||
)/
|
Loading…
Add table
Reference in a new issue