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

tools/compile_and_test_for_board: add black testenv in tox

Add Flake8 and Pylint configuration compatible with black
This commit is contained in:
Alexandre Abadie 2021-09-28 14:58:30 +02:00
parent e86370cf4b
commit c98fc635fc
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,12 @@
# Use black compatible configuration for flake8 and pylint
# flake8: https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
# pylint: https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#pylint
[flake8]
max-line-length = 88
extend-ignore = E203
[pylint]
max-line-length = 88
[pylint.messages_control]
disable = C0330, C0326

View File

@ -1,5 +1,5 @@
[tox]
envlist = test,lint,flake8
envlist = test,lint,flake8,black
skipsdist = True
[testenv]
@ -10,6 +10,7 @@ commands =
test: {[testenv:test]commands}
lint: {[testenv:lint]commands}
flake8: {[testenv:flake8]commands}
black: {[testenv:black]commands}
[testenv:test]
deps = pytest
@ -19,9 +20,14 @@ commands =
[testenv:lint]
deps = pylint
commands =
pylint {env:script} tests
pylint --rcfile=setup.cfg {env:script} tests
[testenv:flake8]
deps = flake8
commands =
flake8 {env:script} tests
[testenv:black]
deps = black
commands =
black --check --diff {env:script} tests