From: John Mulligan Date: Fri, 1 Nov 2024 17:46:40 +0000 (-0400) Subject: python-common: update tox.ini linting environments X-Git-Tag: v20.0.0~647^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=894371cd36a62c430ef683f743be303cfb715b73;p=ceph.git python-common: update tox.ini linting environments Update the tox.ini environments that lint the sources by splitting the old lint env into one that just runs flake8 and another that runs the rstcheck tool. I strongly dislike envs that do more than one thing and make it hard to check specific files. Additionally, the main point of this change was to drop the old `requirements-lint.txt` requirements file that specified an extremely old version of flake8 that did not work correctly with python 3.12. The flake8 of src/pybind/mgr was not pinned so we now match that behavior in src/python-common, which is heavily used by the mgr modules. Part of an effort to get ceph tox environments passing on Python 3.12. Signed-off-by: John Mulligan --- diff --git a/src/python-common/tox.ini b/src/python-common/tox.ini index 313a4334d51..e0b59c700ca 100644 --- a/src/python-common/tox.ini +++ b/src/python-common/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py3, mypy, lint +envlist = lint, rstcheck, mypy, py3 skip_missing_interpreters = true [testenv:py3] @@ -26,9 +26,13 @@ exclude = __pycache__ [testenv:lint] -deps = - -rrequirements-lint.txt +deps = + flake8 commands = flake8 {posargs:ceph} - rstcheck --report info --debug README.rst +[testenv:rstcheck] +deps = + rstcheck +commands = + rstcheck --report-level info README.rst