Skip to content

Commit e626ddf

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

File tree

14 files changed

+18
-15
lines changed

14 files changed

+18
-15
lines changed

mesa/examples/advanced/epstein_civil_violence/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def post_process(ax):
5757
"cop_vision": Slider("Cop Vision", 7, 1, 10, 1),
5858
"legitimacy": Slider("Government Legitimacy", 0.82, 0.0, 1, 0.01),
5959
"max_jail_term": Slider("Max Jail Term", 30, 0, 50, 1),
60-
"stepsize":1,
60+
"stepsize": 1,
6161
}
6262

6363
space_component = make_space_component(

mesa/examples/advanced/pd_grid/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def pd_agent_portrayal(agent):
2929
"value": 42,
3030
"label": "Random Seed",
3131
},
32-
"stepsize":Slider("Step Interval",1,1,20,1),
32+
"stepsize": Slider("Step Interval", 1, 1, 20, 1),
3333
"width": Slider("Grid Width", value=50, min=10, max=100, step=1),
3434
"height": Slider("Grid Height", value=50, min=10, max=100, step=1),
3535
"activation_order": {

mesa/examples/advanced/pd_grid/model.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ class PdGrid(mesa.Model):
1414
payoff = {("C", "C"): 1, ("C", "D"): 0, ("D", "C"): 1.6, ("D", "D"): 0}
1515

1616
def __init__(
17-
self, width=50, height=50, activation_order="Random", payoffs=None, seed=None,stepsize=1,
17+
self,
18+
width=50,
19+
height=50,
20+
activation_order="Random",
21+
payoffs=None,
22+
seed=None,
23+
stepsize=1,
1824
):
1925
"""
2026
Create a new Spatial Prisoners' Dilemma Model.

mesa/examples/advanced/sugarscape_g1mt/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def portray(g):
4848
"value": 42,
4949
"label": "Random Seed",
5050
},
51-
"stepsize": Slider(
51+
"stepsize": Slider(
5252
label="Steps Interval",
5353
value=1,
5454
min=1,

mesa/examples/advanced/wolf_sheep/app.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def wolf_sheep_portrayal(agent):
4848
"values": [True, False],
4949
"label": "grass regrowth enabled?",
5050
},
51-
5251
"grass_regrowth_time": Slider("Grass Regrowth Time", 20, 1, 50),
5352
"initial_sheep": Slider("Initial Sheep Population", 100, 10, 300),
5453
"sheep_reproduce": Slider("Sheep Reproduction Rate", 0.04, 0.01, 1.0, 0.01),

mesa/examples/basic/boid_flockers/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def boid_draw(agent):
1717
"value": 42,
1818
"label": "Random Seed",
1919
},
20-
"stepsize": Slider(
20+
"stepsize": Slider(
2121
label="Steps Interval",
2222
value=1,
2323
min=1,

mesa/examples/basic/boltzmann_wealth_model/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def agent_portrayal(agent):
2828
"max": 100,
2929
"step": 1,
3030
},
31-
"stepsize": {
31+
"stepsize": {
3232
"type": "SliderInt",
3333
"value": 1,
3434
"label": "Steps Interval:",

mesa/examples/basic/boltzmann_wealth_model/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BoltzmannWealth(Model):
2727
datacollector (DataCollector): Collects and stores model data
2828
"""
2929

30-
def __init__(self, n=100, width=10, height=10, seed=None,stepsize=5):
30+
def __init__(self, n=100, width=10, height=10, seed=None, stepsize=5):
3131
"""Initialize the model.
3232
3333
Args:

mesa/examples/basic/conways_game_of_life/app.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def post_process(ax):
2020

2121

2222
model_params = {
23-
2423
"seed": {
2524
"type": "InputText",
2625
"value": 42,

mesa/examples/basic/conways_game_of_life/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
class ConwaysGameOfLife(Model):
77
"""Represents the 2-dimensional array of cells in Conway's Game of Life."""
88

9-
def __init__(self, width=50, height=50, initial_fraction_alive=0.2, seed=None,stepsize=1):
9+
def __init__(
10+
self, width=50, height=50, initial_fraction_alive=0.2, seed=None, stepsize=1
11+
):
1012
"""Create a new playing area of (width, height) cells."""
1113
super().__init__(seed=seed)
1214
# Use a simple grid, where edges wrap around.

mesa/examples/basic/schelling/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def agent_portrayal(agent):
2424
"value": 42,
2525
"label": "Random Seed",
2626
},
27-
"stepsize":Slider("Step Interval",1,1,100,1),
27+
"stepsize": Slider("Step Interval", 1, 1, 100, 1),
2828
"density": Slider("Agent density", 0.8, 0.1, 1.0, 0.1),
2929
"minority_pc": Slider("Fraction minority", 0.2, 0.0, 1.0, 0.05),
3030
"homophily": Slider("Homophily", 0.4, 0.0, 1.0, 0.125),

mesa/examples/basic/virus_on_network/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def get_resistant_susceptible_ratio(model):
4040
"value": 42,
4141
"label": "Random Seed",
4242
},
43-
"stepsize": {
43+
"stepsize": {
4444
"type": "SliderInt",
4545
"value": 1,
4646
"label": "Steps Interval:",

mesa/mesa_logging.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from functools import wraps
1111
from logging import DEBUG, INFO
1212

13-
1413
__all__ = [
1514
"DEBUG",
1615
"DEFAULT_LEVEL",

mesa/visualization/components/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313

1414

1515
def make_space_component(
16-
1716
agent_portrayal: Callable | None = None,
1817
propertylayer_portrayal: dict | None = None,
1918
post_process: Callable | None = None,
2019
backend: str = "matplotlib",
2120
model_parameters: dict | None = None,
2221
**space_drawing_kwargs,
23-
2422
) -> SpaceMatplotlib | SpaceAltair:
2523
"""Create a Matplotlib-based space visualization component.
2624

0 commit comments

Comments
 (0)