]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/mgr_module: annotate some methods
authorKefu Chai <kchai@redhat.com>
Thu, 14 Jan 2021 17:26:13 +0000 (01:26 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 15 Jan 2021 09:25:27 +0000 (17:25 +0800)
as a vehicle to understand the interface

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/mgr_module.py

index b57efed0588812f78a6c062da219d20fb9d40077..7a0a5897aa3cf3f9918a9b7e33f878ac2a856a13 100644 (file)
@@ -1264,13 +1264,13 @@ class MgrModule(ceph_module.BaseMgrModule, MgrModuleLoggingMixin):
         """
         self._ceph_set_health_checks(checks)
 
-    def _handle_command(self, inbuf, cmd):
+    def _handle_command(self, inbuf: str, cmd: Dict[str, Any]):
         if cmd['prefix'] not in CLICommand.COMMANDS:
             return self.handle_command(inbuf, cmd)
 
         return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
 
-    def handle_command(self, inbuf, cmd):
+    def handle_command(self, inbuf: str, cmd: Dict[str, Any]):
         """
         Called by ceph-mgr to request the plugin to handle one
         of the commands that it declared in self.COMMANDS