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>
[tox]
-envlist = py3, mypy, lint
+envlist = lint, rstcheck, mypy, py3
skip_missing_interpreters = true
[testenv:py3]
__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