From: Michael Fritch Date: Tue, 4 May 2021 18:29:45 +0000 (-0600) Subject: cephadm: introduce autopep8 X-Git-Tag: v17.1.0~2008^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0efb4b546c6c24d8a5d109a31d859c6ada77556e;p=ceph.git cephadm: introduce autopep8 Signed-off-by: Michael Fritch --- diff --git a/src/cephadm/tox.ini b/src/cephadm/tox.ini index cbe71cae8c33..8e127123b038 100644 --- a/src/cephadm/tox.ini +++ b/src/cephadm/tox.ini @@ -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 =