Skip to content

Commit f9f7b84

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 95f862e commit f9f7b84

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/schelling/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ def __init__(self, model: mesa.Model, agent_type: int) -> None:
1919

2020
def step(self):
2121
neighbors = self.cell.get_neighborhood(radius=self.model.radius).agents
22-
similar = len([neighbor for neighbor in neighbors if neighbor.type == self.type])
22+
similar = len(
23+
[neighbor for neighbor in neighbors if neighbor.type == self.type]
24+
)
2325

2426
# If unhappy, move:
2527
if similar < self.model.homophily:

0 commit comments

Comments
 (0)