mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
|
- --py-version=3.7
|
||||||
- --platform=linux
|
- --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
|
- repo: https://github.com/saltstack/salt-nox-pre-commit
|
||||||
rev: master
|
rev: master
|
||||||
|
|
|
@ -12,7 +12,7 @@ ignore=CVS,
|
||||||
|
|
||||||
# Add files or directories matching the regex patterns to the blacklist. The
|
# Add files or directories matching the regex patterns to the blacklist. The
|
||||||
# regex matches against base names, not paths.
|
# regex matches against base names, not paths.
|
||||||
ignore-patterns=
|
ignore-patterns=salt.ext.*
|
||||||
|
|
||||||
# Python code to execute, usually for sys.path manipulation such as
|
# Python code to execute, usually for sys.path manipulation such as
|
||||||
# pygtk.require().
|
# pygtk.require().
|
||||||
|
@ -77,6 +77,7 @@ disable=R,
|
||||||
no-member,
|
no-member,
|
||||||
unsubscriptable-object,
|
unsubscriptable-object,
|
||||||
un-indexed-curly-braces-error,
|
un-indexed-curly-braces-error,
|
||||||
|
whitespace-before-colon,
|
||||||
indentation-is-not-a-multiple-of-four-comment,
|
indentation-is-not-a-multiple-of-four-comment,
|
||||||
blacklisted-name,
|
blacklisted-name,
|
||||||
invalid-name,
|
invalid-name,
|
||||||
|
@ -126,6 +127,7 @@ disable=R,
|
||||||
str-format-in-logging,
|
str-format-in-logging,
|
||||||
import-outside-toplevel,
|
import-outside-toplevel,
|
||||||
deprecated-method,
|
deprecated-method,
|
||||||
|
repr-flag-used-in-string,
|
||||||
keyword-arg-before-vararg
|
keyword-arg-before-vararg
|
||||||
|
|
||||||
# Enable the message, report, category or checker with the given id(s). You can
|
# 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