tools/compile_and_test_for_board: add black testenv in tox
Add Flake8 and Pylint configuration compatible with black
This commit is contained in:
parent
e86370cf4b
commit
c98fc635fc
12
dist/tools/compile_and_test_for_board/setup.cfg
vendored
Normal file
12
dist/tools/compile_and_test_for_board/setup.cfg
vendored
Normal 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
|
||||||
10
dist/tools/compile_and_test_for_board/tox.ini
vendored
10
dist/tools/compile_and_test_for_board/tox.ini
vendored
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = test,lint,flake8
|
envlist = test,lint,flake8,black
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
@ -10,6 +10,7 @@ commands =
|
|||||||
test: {[testenv:test]commands}
|
test: {[testenv:test]commands}
|
||||||
lint: {[testenv:lint]commands}
|
lint: {[testenv:lint]commands}
|
||||||
flake8: {[testenv:flake8]commands}
|
flake8: {[testenv:flake8]commands}
|
||||||
|
black: {[testenv:black]commands}
|
||||||
|
|
||||||
[testenv:test]
|
[testenv:test]
|
||||||
deps = pytest
|
deps = pytest
|
||||||
@ -19,9 +20,14 @@ commands =
|
|||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
deps = pylint
|
deps = pylint
|
||||||
commands =
|
commands =
|
||||||
pylint {env:script} tests
|
pylint --rcfile=setup.cfg {env:script} tests
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
deps = flake8
|
deps = flake8
|
||||||
commands =
|
commands =
|
||||||
flake8 {env:script} tests
|
flake8 {env:script} tests
|
||||||
|
|
||||||
|
[testenv:black]
|
||||||
|
deps = black
|
||||||
|
commands =
|
||||||
|
black --check --diff {env:script} tests
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user