From f9f7b841857fccabe399b8c013b18f01c3258a7c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:08:01 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/schelling/model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: