1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pythonlib/riotctrl_ctrl: add black testenv in tox

Add Flake8 configuration compatible with black
This commit is contained in:
Alexandre Abadie 2021-09-29 13:13:56 +02:00
parent 5abd097abf
commit ba1173409f
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 15 additions and 1 deletions

View 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

View File

@ -1,11 +1,12 @@
[tox]
envlist = test,flake8
envlist = test,flake8,black
skipsdist = True
[testenv]
commands =
test: {[testenv:test]commands}
flake8: {[testenv:flake8]commands}
black: {[testenv:black]commands}
[testenv:test]
deps =
@ -18,3 +19,11 @@ commands =
deps = flake8
commands =
flake8 .
[testenv:black]
allowlist_externals =
/usr/bin/bash
/bin/bash
deps = black
commands =
bash -c "black --check --diff --color tests/ *.py"