Skip to content

Commit 0bc3965

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

File tree

3 files changed

+9
-3
lines changed
  • examples
    • boltzmann_wealth_model_network/boltzmann_wealth_model_network
    • color_patches/color_patches
    • conways_game_of_life/conways_game_of_life

3 files changed

+9
-3
lines changed

examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ def __init__(self, num_agents=7, num_nodes=10):
1818
self.num_agents = num_agents
1919
self.num_nodes = num_nodes if num_nodes >= self.num_agents else self.num_agents
2020
self.G = nx.erdos_renyi_graph(n=self.num_nodes, p=0.5)
21-
self.grid = mesa.experimental.cell_space.Network(self.G, random=self.random, capacity=1)
21+
self.grid = mesa.experimental.cell_space.Network(
22+
self.G, random=self.random, capacity=1
23+
)
2224

2325
self.datacollector = mesa.DataCollector(
2426
model_reporters={"Gini": compute_gini},

examples/color_patches/color_patches/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ def __init__(self, width=20, height=20):
6666
The agents next state is first determined before updating the grid
6767
"""
6868
super().__init__()
69-
self._grid = mesa.experimental.cell_space.OrthogonalMooreGrid((width, height), torus=False)
69+
self._grid = mesa.experimental.cell_space.OrthogonalMooreGrid(
70+
(width, height), torus=False
71+
)
7072

7173
# self._grid.coord_iter()
7274
# --> should really not return content + col + row

examples/conways_game_of_life/conways_game_of_life/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ def __init__(self, width=50, height=50):
1515
"""
1616
super().__init__()
1717
# Use a simple grid, where edges wrap around.
18-
self.grid = mesa.experimental.cell_space.OrthogonalMooreGrid((width, height), torus=True)
18+
self.grid = mesa.experimental.cell_space.OrthogonalMooreGrid(
19+
(width, height), torus=True
20+
)
1921

2022
# Place a cell at each location, with some initialized to
2123
# ALIVE and some to DEAD.

0 commit comments

Comments
 (0)