]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: introduce autopep8
authorMichael Fritch <mfritch@suse.com>
Tue, 4 May 2021 18:29:45 +0000 (12:29 -0600)
committerMichael Fritch <mfritch@suse.com>
Wed, 5 May 2021 13:56:54 +0000 (07:56 -0600)
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/tox.ini

index cbe71cae8c33632fbf771fa9e947034e8321856e..8e127123b0383f3d96f416b23d0146dfbacb6666 100644 (file)
@@ -1,6 +1,11 @@
 [tox]
-envlist = py3, mypy, flake8
-skipsdist=true
+envlist =
+    py3
+    mypy
+    fix
+    flake8
+skipsdist = true
+requires = cython
 
 [flake8]
 max-line-length = 100
@@ -17,6 +22,15 @@ exclude =
     .eggs
 statistics = True
 
+[autopep8]
+addopts =
+    --max-line-length {[flake8]max-line-length}
+    --ignore "{[flake8]ignore}"
+    --exclude "{[flake8]exclude}"
+    --in-place
+    --recursive
+    --ignore-local-config
+
 [testenv]
 skip_install=true
 deps =
@@ -29,6 +43,14 @@ basepython = python3
 deps = mypy==0.790
 commands = mypy --config-file ../mypy.ini {posargs:cephadm}
 
+[testenv:fix]
+basepython = python3
+deps =
+    autopep8
+commands =
+    python --version
+    autopep8 {[autopep8]addopts} {posargs: cephadm}
+
 [testenv:flake8]
 basepython = python3
 deps =