Skip to content

Commit

Permalink
BB: Pass generator instead of list comprehension to all()
Browse files Browse the repository at this point in the history
This will allow a short-circuit.
  • Loading branch information
mssalvatore committed Oct 4, 2022
1 parent c0c21ba commit e4fdf90
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ def get_test_query_results(response):

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))

0 comments on commit e4fdf90

Please sign in to comment.