]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: introduce flake8
authorMichael Fritch <mfritch@suse.com>
Fri, 12 Feb 2021 15:59:07 +0000 (08:59 -0700)
committerSage Weil <sage@newdream.net>
Tue, 16 Mar 2021 12:56:16 +0000 (07:56 -0500)
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 78916a499c5d8c1cef46613859152f16bdaa669f)

src/cephadm/CMakeLists.txt
src/cephadm/tox.ini

index 9f2d2ab2d827ed47e92216eb1b9ff377033c30dc..13be09bae21ce8ffa70b53731e2b4fdc79d93efb 100644 (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()
index 352277c714f31d2280b4468859a94983dc66d350..528f75d5f97b27eac018bbb50a3a70853cdf9357 100644 (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}