Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
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)
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
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}