From: Volker Theile Date: Thu, 27 Feb 2020 09:38:14 +0000 (+0100) Subject: mgr/dashboard: make check mypy failure X-Git-Tag: v15.1.1~230^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=cf37ffd02b9dbcee31110e2bc6e479ba5b24a523;p=ceph-ci.git mgr/dashboard: make check mypy failure Fixes: https://tracker.ceph.com/issues/44319 Signed-off-by: Volker Theile --- diff --git a/src/pybind/mgr/dashboard/services/ceph_service.py b/src/pybind/mgr/dashboard/services/ceph_service.py index f015c92f1ca..f43304ac095 100644 --- a/src/pybind/mgr/dashboard/services/ceph_service.py +++ b/src/pybind/mgr/dashboard/services/ceph_service.py @@ -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: