Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 14, 2024
1 parent 95f862e commit f9f7b84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/schelling/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f9f7b84

Please sign in to comment.