mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Cleanup with ruff check (#1182)
* Implement improvements suggested by ruff check. * Add ruff check to CI.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user