mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
Add black wrapper
Some system roles want not to run black on their code. This wrapper decides whether to run black or not depending on content of config.sh. This wrapper also allows to set patterns of files and directories via config.sh to be processed or skipped by black.
This commit is contained in:
parent
984eb0d60e
commit
2c79fad96f
3 changed files with 83 additions and 1 deletions
5
tox.ini
5
tox.ini
|
|
@ -126,10 +126,13 @@ commands =
|
|||
[testenv:black]
|
||||
envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:3.6}
|
||||
basepython = python3.6
|
||||
passenv = RUN_BLACK_*
|
||||
deps =
|
||||
black
|
||||
whitelist_externals =
|
||||
{[base]whitelist_externals}
|
||||
commands =
|
||||
black --check --diff --include "^[^.].*\.py$" --exclude "/(\.[^.].*|tests/roles)/" .
|
||||
bash {toxinidir}/.travis/runblack.sh {envpython} --check --diff .
|
||||
|
||||
[testenv:pylint]
|
||||
envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:2.7}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue