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
+4 -4
View File
@@ -585,10 +585,10 @@ class ServicesManager(BaseComposeManager):
return args
def _are_containers_stopped(self) -> bool:
for container in self.list_containers_raw():
if container["State"] not in ("created", "exited", "stopped", "killed"):
return False
return True
return all(
container["State"] in ("created", "exited", "stopped", "killed")
for container in self.list_containers_raw()
)
def cmd_stop(self) -> dict[str, t.Any]:
# Since 'docker compose stop' **always** claims it is stopping containers, even if they are already