]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: silence flake8 warnings
authorKefu Chai <kchai@redhat.com>
Fri, 29 Jan 2021 02:30:19 +0000 (10:30 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 29 Jan 2021 11:42:32 +0000 (19:42 +0800)
silence following warnings from flake8

* line too long (107 > 100 characters) [E501]

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

index 44a2c10f5d7aaa6c8c7eae6f5095c9a8a41998e0..a6814dfa61bf1a0c96aa704a7ca481f22fc48562 100644 (file)
@@ -378,7 +378,10 @@ class CLICommand(object):
             kwargs[k] = CephArgtype.cast_to(tp, v)
         return kwargs
 
-    def call(self, mgr: Any, cmd_dict: Dict[str, Any], inbuf: Optional[str] = None) -> HandleCommandResult:
+    def call(self,
+             mgr: Any,
+             cmd_dict: Dict[str, Any],
+             inbuf: Optional[str] = None) -> HandleCommandResult:
         kwargs = self._collect_args_by_argspec(cmd_dict)
         if inbuf:
             kwargs['inbuf'] = inbuf
@@ -786,6 +789,9 @@ class MgrStandbyModule(ceph_module.BaseMgrStandbyModule, MgrModuleLoggingMixin):
             return r
 
 
+HealthChecksT = Mapping[str, Mapping[str, Union[int, str, Sequence[str]]]]
+
+
 class MgrModule(ceph_module.BaseMgrModule, MgrModuleLoggingMixin):
     COMMANDS = []  # type: List[Any]
     MODULE_OPTIONS: List[Option] = []
@@ -1276,8 +1282,7 @@ class MgrModule(ceph_module.BaseMgrModule, MgrModuleLoggingMixin):
         """
         self._ceph_send_command(result, svc_type, svc_id, command, tag, inbuf)
 
-    def set_health_checks(self,
-                          checks: Mapping[str, Mapping[str, Union[int, str, Sequence[str]]]]) -> None:
+    def set_health_checks(self, checks: HealthChecksT) -> None:
         """
         Set the module's current map of health checks.  Argument is a
         dict of check names to info, in this form:
@@ -1612,7 +1617,11 @@ class MgrModule(ceph_module.BaseMgrModule, MgrModuleLoggingMixin):
 
         return self._ceph_have_mon_connection()
 
-    def update_progress_event(self, evid: str, desc: str, progress: float, add_to_ceph_s: bool) -> None:
+    def update_progress_event(self,
+                              evid: str,
+                              desc: str,
+                              progress: float,
+                              add_to_ceph_s: bool) -> None:
         return self._ceph_update_progress_event(evid, desc, progress, add_to_ceph_s)
 
     def complete_progress_event(self, evid: str) -> None: