]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: make check mypy failure
authorVolker Theile <vtheile@suse.com>
Thu, 27 Feb 2020 09:38:14 +0000 (10:38 +0100)
committerVolker Theile <vtheile@suse.com>
Thu, 27 Feb 2020 10:02:11 +0000 (11:02 +0100)
Fixes: https://tracker.ceph.com/issues/44319
Signed-off-by: Volker Theile <vtheile@suse.com>
src/pybind/mgr/dashboard/services/ceph_service.py

index f015c92f1ca5ef78a1cf2cf94007f5a1c438186d..f43304ac095a9b357c78b307daf1598917da55ed 100644 (file)
@@ -166,6 +166,7 @@ class CephService(object):
 
     @staticmethod
     def _get_smart_data_by_device(device):
+        # type: (dict) -> Dict[str, dict]
         # Check whether the device is associated with daemons.
         if 'daemons' in device and device['daemons']:
             dev_smart_data = None
@@ -187,7 +188,7 @@ class CephService(object):
             # that are 'up'. All daemons on the same host can deliver
             # SMART data, thus it is not relevant for us which daemon
             # we are using.
-            daemons = list(set(daemons) & set(osd_daemons_up))
+            daemons = list(set(daemons) & set(osd_daemons_up))  # type: ignore
 
             for daemon in daemons:
                 svc_type, svc_id = daemon.split('.')
@@ -249,7 +250,7 @@ class CephService(object):
 
     @staticmethod
     def get_smart_data_by_daemon(daemon_type, daemon_id):
-        # type: (str, str) -> dict
+        # type: (str, str) -> Dict[str, dict]
         """
         Get the SMART data of the devices associated with the given daemon.
         :param daemon_type: The daemon type, e.g. 'osd' or 'mon'.
@@ -259,7 +260,7 @@ class CephService(object):
           key in the dictionary.
         """
         devices = CephService.get_devices_by_daemon(daemon_type, daemon_id)
-        smart_data = {}
+        smart_data = {}  # type: Dict[str, dict]
         if devices:
             for device in devices:
                 if device['devid'] not in smart_data: