pythonlib/riotctrl_shell: add black testenv in tox
Add Flake8 configuration compatible with black
This commit is contained in:
parent
43550cd853
commit
f2bb9242bb
5
dist/pythonlibs/riotctrl_shell/setup.cfg
vendored
Normal file
5
dist/pythonlibs/riotctrl_shell/setup.cfg
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Use black compatible configuration for flake8
|
||||||
|
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
|
||||||
|
[flake8]
|
||||||
|
max-line-length = 88
|
||||||
|
extend-ignore = E203
|
||||||
11
dist/pythonlibs/riotctrl_shell/tox.ini
vendored
11
dist/pythonlibs/riotctrl_shell/tox.ini
vendored
@ -1,11 +1,12 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = test,flake8
|
envlist = test,flake8,black
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands =
|
commands =
|
||||||
test: {[testenv:test]commands}
|
test: {[testenv:test]commands}
|
||||||
flake8: {[testenv:flake8]commands}
|
flake8: {[testenv:flake8]commands}
|
||||||
|
black: {[testenv:black]commands}
|
||||||
|
|
||||||
[testenv:test]
|
[testenv:test]
|
||||||
deps =
|
deps =
|
||||||
@ -18,3 +19,11 @@ commands =
|
|||||||
deps = flake8
|
deps = flake8
|
||||||
commands =
|
commands =
|
||||||
flake8 .
|
flake8 .
|
||||||
|
|
||||||
|
[testenv:black]
|
||||||
|
allowlist_externals =
|
||||||
|
/usr/bin/bash
|
||||||
|
/bin/bash
|
||||||
|
deps = black
|
||||||
|
commands =
|
||||||
|
bash -c "black --check --diff --color tests/ *.py"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user