cephadm: introduce flake8

Signed-off-by: Michael Fritch <mfritch@suse.com>
This commit is contained in:
Michael Fritch 2021-02-12 08:59:07 -07:00
parent 86b25bc0be
commit 78916a499c
No known key found for this signature in database
GPG Key ID: 75F3EB2E80A03B7F
2 changed files with 57 additions and 2 deletions

View File

@ -1,4 +1,4 @@
if(WITH_TESTS)
include(AddCephTest)
add_tox_test(cephadm TOX_ENVS py3 mypy)
add_tox_test(cephadm TOX_ENVS py3 mypy flake8)
endif()

View File

@ -1,7 +1,55 @@
[tox]
envlist = py3, mypy
envlist = py3, mypy, flake8
skipsdist=true
[flake8]
max-line-length = 100
ignore =
E117,
E121,
E122,
E123,
E124,
E125,
E126,
E127,
E128,
E131,
E201,
E203,
E225,
E226,
E231,
E241,
E251,
E261,
E265,
E266,
E301,
E302,
E303,
E305,
E306,
E402,
E501,
E703,
E722,
E741,
F401,
F841,
W291,
W293,
W503,
W504,
exclude =
.tox,
.vagrant,
__pycache__,
*.pyc,
templates,
.eggs
statistics = True
[testenv]
skip_install=true
deps =
@ -13,3 +61,10 @@ commands=pytest {posargs}
basepython = python3
deps = mypy==0.790
commands = mypy --config-file ../mypy.ini {posargs:cephadm}
[testenv:flake8]
basepython = python3
deps =
flake8
commands =
flake8 --config=tox.ini {posargs:cephadm}