From 4e4d4c5e4b6118c1629083b0bfca0fb00b500271 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Thu, 28 Jan 2021 13:16:04 -0700 Subject: [PATCH] mgr/cephadm: Line break occurred after a binary operator (W504) Signed-off-by: Michael Fritch --- src/pybind/mgr/cephadm/module.py | 12 ++++++------ src/pybind/mgr/tox.ini | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index cba40a97085..e58d10815c3 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -907,8 +907,8 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, return 1, '', ('check-host failed:\n' + '\n'.join(err)) except OrchestratorError as e: self.log.exception(f"check-host failed for '{host}'") - return 1, '', ('check-host failed:\n' + - f"Host '{host}' not found. Use 'ceph orch host ls' to see all managed hosts.") + return 1, '', ('check-host failed:\n' + + f"Host '{host}' not found. Use 'ceph orch host ls' to see all managed hosts.") # if we have an outstanding health alert for this host, give the # serve thread a kick if 'CEPHADM_HOST_CHECK_FAILED' in self.health_checks: @@ -1176,8 +1176,8 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, """ return [ h for h in self.inventory.all_specs() - if self.cache.host_had_daemon_refresh(h.hostname) and - h.status.lower() not in ['maintenance', 'offline'] + if self.cache.host_had_daemon_refresh(h.hostname) + and h.status.lower() not in ['maintenance', 'offline'] ] def _add_host(self, spec): @@ -1287,8 +1287,8 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, return 1, '\n'.join(error_notifications) if notifications: - return 0, (f'It is presumed safe to stop host {hostname}. ' + - 'Note the following:\n\n' + '\n'.join(notifications)) + return 0, (f'It is presumed safe to stop host {hostname}. ' + + 'Note the following:\n\n' + '\n'.join(notifications)) return 0, f'It is presumed safe to stop host {hostname}' @trivial_completion diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index 742aaa60f9a..b365e480484 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -16,7 +16,6 @@ ignore = F811, F841, W503, - W504, exclude = .tox, .vagrant, -- 2.39.5