Cleanup with ruff check (#1182)

* Implement improvements suggested by ruff check.

* Add ruff check to CI.
This commit is contained in:
Felix Fontein
2025-10-28 06:58:15 +01:00
committed by GitHub
parent 3bade286f8
commit dbc7b0ec18
40 changed files with 247 additions and 232 deletions
+2 -3
View File
@@ -554,9 +554,8 @@ class SwarmManager(DockerBaseClass):
except APIError as exc:
self.client.fail(f"Can not create a new Swarm Cluster: {exc}")
if not self.client.check_if_swarm_manager():
if not self.check_mode:
self.client.fail("Swarm not created or other error!")
if not self.client.check_if_swarm_manager() and not self.check_mode:
self.client.fail("Swarm not created or other error!")
self.created = True
self.inspect_swarm()