From 6ae767632201b528ab89f98b375b0dd234b2b651 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 4 Oct 2022 15:43:25 -0400 Subject: [PATCH] BB: Pass generator instead of list comprehension to all() This will allow a short-circuit. --- envs/monkey_zoo/blackbox/island_client/monkey_island_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py b/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py index 28dc1f135..4f723e8a7 100644 --- a/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py +++ b/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py @@ -172,4 +172,4 @@ class MonkeyIslandClient(object): def is_all_monkeys_dead(self): agents = self.get_agents() - return all([a.stop_time is not None for a in agents]) + return all((a.stop_time is not None for a in agents))