]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
python-common: update tox.ini linting environments
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 1 Nov 2024 17:46:40 +0000 (13:46 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Mon, 4 Nov 2024 20:38:43 +0000 (15:38 -0500)
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 <jmulligan@redhat.com>
src/python-common/tox.ini

index 313a4334d51c1ad65e44caf6ae59e916bd96c257..e0b59c700ca3eb6bc8df6529b9d1edc461994646 100644 (file)
@@ -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