]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: fix mypy env to allow use with >1 python version
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 18 Mar 2024 20:16:05 +0000 (16:16 -0400)
committerAdam King <adking@redhat.com>
Wed, 27 Mar 2024 15:19:08 +0000 (11:19 -0400)
tox supports automatically running tools with different python versions
if you name your envs properly. Continue to permit the use of `mypy` as
an env (as the default) but also allow a selection of python
versions like `py38-mypy`.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 928c54683e17946df23aed4ecb3b0bc9c7c60c9c)

src/pybind/mgr/tox.ini

index 13aae3820a23d38b92ee372f1bf6ac3321bd8014..62f3ec07ca805b1fe396c2dcece1301b976c3223 100644 (file)
@@ -65,12 +65,11 @@ commands =
     pytest {posargs:cephadm/tests/test_ssh.py}
 
 
-[testenv:mypy]
+[testenv:{,py37-,py38-,py39-,py310-}mypy]
 setenv =
     MYPYPATH = {toxinidir}/..
 passenv =
     MYPYPATH
-basepython = python3
 deps =
     -rrequirements.txt
     -c{toxinidir}/../../mypy-constrains.txt