diff --git a/dist/pythonlibs/riotctrl_ctrl/setup.cfg b/dist/pythonlibs/riotctrl_ctrl/setup.cfg new file mode 100644 index 0000000000..543d246664 --- /dev/null +++ b/dist/pythonlibs/riotctrl_ctrl/setup.cfg @@ -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 diff --git a/dist/pythonlibs/riotctrl_ctrl/tox.ini b/dist/pythonlibs/riotctrl_ctrl/tox.ini index 1b8ac29b71..5c205e8715 100644 --- a/dist/pythonlibs/riotctrl_ctrl/tox.ini +++ b/dist/pythonlibs/riotctrl_ctrl/tox.ini @@ -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"