Skip to content

Commit 57d9cb5

Browse files
pre-commit-ci[bot]tpike3
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent da99bd8 commit 57d9cb5

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

mesa/experimental/jupyter_viz.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ def JupyterViz(
8888

8989
# 2. Set up Model
9090
def make_model():
91-
model = model_class.__new__(model_class, **model_parameters, seed=reactive_seed.value)
91+
model = model_class.__new__(
92+
model_class, **model_parameters, seed=reactive_seed.value
93+
)
9294
model.__init__(**model_parameters)
9395
current_step.value = 0
9496
return model
@@ -171,9 +173,7 @@ def render_in_browser():
171173
ModelController(model, play_interval, current_step, reset_counter)
172174
solara.Button(label="Reseed", color="primary", on_click=do_reseed)
173175
with solara.Card("Information", margin=1, elevation=2):
174-
solara.Markdown(
175-
md_text=f"Step - {current_step}"
176-
)
176+
solara.Markdown(md_text=f"Step - {current_step}")
177177

178178
items = [
179179
Card(
@@ -259,7 +259,8 @@ def do_set_playing(value):
259259
solara.Button(label="Step", color="primary", on_click=do_step)
260260
# This style is necessary so that the play widget has almost the same
261261
# height as typical Solara buttons.
262-
solara.Style("""
262+
solara.Style(
263+
"""
263264
.widget-play {
264265
height: 35px;
265266
}

tests/test_jupyter_viz.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import unittest
2-
from unittest.mock import Mock, patch
2+
from unittest.mock import Mock
33

44
import ipyvuetify as vw
55
import solara
@@ -83,7 +83,9 @@ def Test(user_params):
8383

8484

8585
def test_call_space_drawer(mocker):
86-
mock_space_matplotlib = mocker.patch("mesa.experimental.components.matplotlib.SpaceMatplotlib")
86+
mock_space_matplotlib = mocker.patch(
87+
"mesa.experimental.components.matplotlib.SpaceMatplotlib"
88+
)
8789

8890
model = mesa.Model()
8991
mocker.patch.object(mesa.Model, "__new__", return_value=model)
@@ -134,9 +136,7 @@ def test_call_space_drawer(mocker):
134136
space_drawer=altspace_drawer,
135137
)
136138
)
137-
altspace_drawer.assert_called_with(
138-
model, agent_portrayal
139-
)
139+
altspace_drawer.assert_called_with(model, agent_portrayal)
140140

141141

142142
def test_slider():

0 commit comments

Comments
 (0)