Skip to content

Commit e37eeb9

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

File tree

6 files changed

+5
-6
lines changed

6 files changed

+5
-6
lines changed

examples/bank_reserves/bank_reserves/agents.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def __init__(self, model, moore, bank, rich_threshold):
6565
def do_business(self):
6666
"""check if person has any savings, any money in wallet, or if the
6767
bank can loan them any money"""
68-
if (self.savings > 0 or self.wallet > 0 or self.bank.bank_to_loan > 0) and len(self.cell.agents) > 1:
68+
if (self.savings > 0 or self.wallet > 0 or self.bank.bank_to_loan > 0) and len(
69+
self.cell.agents
70+
) > 1:
6971
# create list of people at my location (includes self)
7072
# set customer to self for while loop condition
7173
customer = self

examples/bank_reserves/batch_run.py

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
directory from which Python was run. The CSV file will contain the data from
2424
every step of every run.
2525
"""
26+
2627
import itertools
2728
import mesa
2829
import pandas as pd

examples/hex_snowflake/hex_snowflake/cell.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from mesa.experimental.cell_space import FixedAgent
32

43

examples/pd_grid/pd_grid/agent.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from mesa.experimental.cell_space import CellAgent
32

43

@@ -31,7 +30,7 @@ def step(self):
3130
if better than own score."""
3231

3332
# neighbors = self.model.grid.get_neighbors(self.pos, True, include_center=True)
34-
neighbors = [*list(self.cell.neighborhood.agents), self]
33+
neighbors = [*list(self.cell.neighborhood.agents), self]
3534
best_neighbor = max(neighbors, key=lambda a: a.score)
3635
self.next_move = best_neighbor.move
3736

examples/sugarscape_g1mt/sugarscape_g1mt/resource_agents.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from mesa.experimental.cell_space import FixedAgent
32

43

examples/wolf_sheep/wolf_sheep/agents.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from mesa.experimental.cell_space import CellAgent, FixedAgent
32

43

0 commit comments

Comments
 (0)