if(WITH_TESTS)
include(AddCephTest)
- add_tox_test(cephadm TOX_ENVS py3 mypy)
+ add_tox_test(cephadm TOX_ENVS py3 mypy flake8)
endif()
[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 =
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}