mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
pybind/mgr: tox: also test mypy with python 3.7
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
This commit is contained in:
parent
5ca7b8b622
commit
2dd86c9e3e
@ -29,13 +29,13 @@ from mgr_util import profile_method
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import get_args, get_origin
|
||||
else:
|
||||
def get_args(tp):
|
||||
def get_args(tp: Any) -> Any:
|
||||
if tp is Generic:
|
||||
return tp
|
||||
else:
|
||||
return getattr(tp, '__args__', ())
|
||||
|
||||
def get_origin(tp):
|
||||
def get_origin(tp: Any) -> Any:
|
||||
return getattr(tp, '__origin__', None)
|
||||
|
||||
|
||||
|
@ -60,6 +60,38 @@ setenv =
|
||||
passenv =
|
||||
MYPYPATH
|
||||
basepython = python3
|
||||
mypy_args = --config-file=../../mypy.ini
|
||||
-m alerts
|
||||
-m balancer
|
||||
-m cephadm
|
||||
-m crash
|
||||
-m dashboard
|
||||
-m devicehealth
|
||||
-m diskprediction_local
|
||||
-m hello
|
||||
-m influx
|
||||
-m iostat
|
||||
-m localpool
|
||||
-m mds_autoscaler
|
||||
-m mgr_module
|
||||
-m mgr_util
|
||||
-m mirroring
|
||||
-m nfs
|
||||
-m orchestrator
|
||||
-m pg_autoscaler
|
||||
-m progress
|
||||
-m prometheus
|
||||
-m rbd_support
|
||||
-m rook
|
||||
-m snap_schedule
|
||||
-m selftest
|
||||
-m stats
|
||||
-m status
|
||||
-m telegraf
|
||||
-m telemetry
|
||||
-m test_orchestrator
|
||||
-m volumes
|
||||
-m zabbix
|
||||
deps =
|
||||
cython
|
||||
-rrequirements.txt
|
||||
@ -71,38 +103,9 @@ deps =
|
||||
types-PyYAML
|
||||
types-jwt
|
||||
commands =
|
||||
mypy --config-file=../../mypy.ini \
|
||||
-m alerts \
|
||||
-m balancer \
|
||||
-m cephadm \
|
||||
-m crash \
|
||||
-m dashboard \
|
||||
-m devicehealth \
|
||||
-m diskprediction_local \
|
||||
-m hello \
|
||||
-m influx \
|
||||
-m iostat \
|
||||
-m localpool \
|
||||
-m mds_autoscaler \
|
||||
-m mgr_module \
|
||||
-m mgr_util \
|
||||
-m mirroring \
|
||||
-m nfs \
|
||||
-m orchestrator \
|
||||
-m pg_autoscaler \
|
||||
-m progress \
|
||||
-m prometheus \
|
||||
-m rbd_support \
|
||||
-m rook \
|
||||
-m snap_schedule \
|
||||
-m selftest \
|
||||
-m stats \
|
||||
-m status \
|
||||
-m telegraf \
|
||||
-m telemetry \
|
||||
-m test_orchestrator \
|
||||
-m volumes \
|
||||
-m zabbix
|
||||
mypy {[testenv:mypy]mypy_args}
|
||||
mypy --python-version 3.7 {[testenv:mypy]mypy_args}
|
||||
|
||||
|
||||
[testenv:test]
|
||||
setenv = {[testenv]setenv}
|
||||
|
Loading…
Reference in New Issue
Block a user