From: Sebastian Wagner Date: Wed, 9 Jun 2021 10:53:21 +0000 (+0200) Subject: qa: Upgrade to mypy 0.901 X-Git-Tag: v17.1.0~1655^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1f6b4744b57fc964bd3c7d861fe1e3eedd44895a;p=ceph.git qa: Upgrade to mypy 0.901 mypy 0.9 now requires stub packages Signed-off-by: Sebastian Wagner --- diff --git a/qa/tasks/mgr/dashboard/helper.py b/qa/tasks/mgr/dashboard/helper.py index 2b6bedc948a3..d27e0161325d 100644 --- a/qa/tasks/mgr/dashboard/helper.py +++ b/qa/tasks/mgr/dashboard/helper.py @@ -593,7 +593,7 @@ class JLeaf(namedtuple('JLeaf', ['typ', 'none'])): JList = namedtuple('JList', ['elem_typ']) -JTuple = namedtuple('JList', ['elem_typs']) +JTuple = namedtuple('JTuple', ['elem_typs']) JUnion = namedtuple('JUnion', ['elem_typs']) diff --git a/qa/tox.ini b/qa/tox.ini index 9e20bc1d28e2..f8573a403265 100644 --- a/qa/tox.ini +++ b/qa/tox.ini @@ -10,7 +10,15 @@ commands=flake8 --select=F,E9 --exclude=venv,.tox [testenv:mypy] basepython = python3 -deps = mypy==0.812 +deps = + mypy==0.901 + types-boto + types-requests + types-jwt + types-paramiko + types-PyYAML + types-cryptography + types-python-dateutil commands = mypy {posargs:.} [testenv:import-tasks] @@ -23,4 +31,4 @@ basepython = python3 deps = {env:TEUTHOLOGY_GIT:git+https://github.com/ceph/teuthology.git@master}#egg=teuthology[test] httplib2 -commands = pytest -vv tasks/tests \ No newline at end of file +commands = pytest -vv tasks/tests diff --git a/qa/workunits/mon/test_mon_config_key.py b/qa/workunits/mon/test_mon_config_key.py index 0d8ec1c27d9a..f81804c8af8c 100755 --- a/qa/workunits/mon/test_mon_config_key.py +++ b/qa/workunits/mon/test_mon_config_key.py @@ -20,6 +20,7 @@ import string import subprocess import sys import time +from typing import List, Dict # # Accepted Environment variables: @@ -64,9 +65,9 @@ OPS = { 'dump': ['existing', 'enoent'], } -CONFIG_PUT = [] # list: keys -CONFIG_DEL = [] # list: keys -CONFIG_EXISTING = {} # map: key -> size +CONFIG_PUT: List[str] = [] # list: keys +CONFIG_DEL: List[str] = [] # list: keys +CONFIG_EXISTING: Dict[str, int] = {} # map: key -> size def run_cmd(cmd, expects=0): diff --git a/qa/workunits/rest/test_mgr_rest_api.py b/qa/workunits/rest/test_mgr_rest_api.py index f8158af25314..74126ab7808a 100755 --- a/qa/workunits/rest/test_mgr_rest_api.py +++ b/qa/workunits/rest/test_mgr_rest_api.py @@ -89,6 +89,7 @@ for method, endpoint, args in screenplay: headers=headers, verify=False, auth=auth) + assert request is not None print(request.text) if request.status_code != 200 or 'error' in request.json(): print('ERROR: %s request for URL "%s" failed' % (method, url))