]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa: Upgrade to mypy 0.901
authorSebastian Wagner <sewagner@redhat.com>
Wed, 9 Jun 2021 10:53:21 +0000 (12:53 +0200)
committerSebastian Wagner <sewagner@redhat.com>
Wed, 9 Jun 2021 10:53:21 +0000 (12:53 +0200)
mypy 0.9 now requires stub packages

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
qa/tasks/mgr/dashboard/helper.py
qa/tox.ini
qa/workunits/mon/test_mon_config_key.py
qa/workunits/rest/test_mgr_rest_api.py

index 2b6bedc948a37cf8c4d831f97a3e1137bc317073..d27e0161325d3ffab2ee5dc6d6a56576e26c980b 100644 (file)
@@ -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'])
 
index 9e20bc1d28e26d396758e04c207ad3ad69390a4f..f8573a40326582666f1df2fc819ddef9aecfbee8 100644 (file)
@@ -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
index 0d8ec1c27d9a217093bdc99043bf5bdf06b1af42..f81804c8af8cefd077589ff3ffea21fb9245fc94 100755 (executable)
@@ -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):
index f8158af25314b6a829f6dfa35b298c09dd43e253..74126ab7808a288cf723b04e42ac206c2571d60e 100755 (executable)
@@ -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))