diff --git a/examples/schelling/model.py b/examples/schelling/model.py index 4bdca529..a2b32ba3 100644 --- a/examples/schelling/model.py +++ b/examples/schelling/model.py @@ -19,7 +19,9 @@ def __init__(self, model: mesa.Model, agent_type: int) -> None: def step(self): neighbors = self.cell.get_neighborhood(radius=self.model.radius).agents - similar = len([neighbor for neighbor in neighbors if neighbor.type == self.type]) + similar = len( + [neighbor for neighbor in neighbors if neighbor.type == self.type] + ) # If unhappy, move: if similar < self.model.homophily: