]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/mgr_module: correct annotation
authorKefu Chai <kchai@redhat.com>
Wed, 27 Jan 2021 04:07:07 +0000 (12:07 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Mar 2021 07:34:15 +0000 (15:34 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 19cdc4325ce47bef951fdab41fa15e6acadea1f7)

src/pybind/mgr/mgr_module.py

index e956c8a1c3ab5387ff00adf9646dbdca366334b2..b118e487e1fd7bdaa31f99c76a5208cf7e4638b7 100644 (file)
@@ -1,7 +1,7 @@
 import ceph_module  # noqa
 
 from typing import cast, Tuple, Any, Dict, Generic, Optional, Callable, List, \
-    NamedTuple, Sequence, Union, TYPE_CHECKING
+    Mapping, NamedTuple, Sequence, Union, TYPE_CHECKING
 if TYPE_CHECKING:
     import sys
     if sys.version_info >= (3, 8):
@@ -1281,7 +1281,8 @@ class MgrModule(ceph_module.BaseMgrModule, MgrModuleLoggingMixin):
         """
         self._ceph_send_command(result, svc_type, svc_id, command, tag, inbuf)
 
-    def set_health_checks(self, checks: Dict[str, Dict[str, Sequence[str]]]) -> None:
+    def set_health_checks(self,
+                          checks: Mapping[str, Mapping[str, Union[int, str, Sequence[str]]]]) -> None:
         """
         Set the module's current map of health checks.  Argument is a
         dict of check names to info, in this form: