From: Kefu Chai Date: Fri, 29 Jan 2021 02:30:19 +0000 (+0800) Subject: pybind/mgr: silence flake8 warnings X-Git-Tag: v17.1.0~3116^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=367f264100778717890b7fb69668e44f0a22d8ce;p=ceph.git pybind/mgr: silence flake8 warnings silence following warnings from flake8 * line too long (107 > 100 characters) [E501] Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 44a2c10f5d7a..a6814dfa61bf 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -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: