Skip to content

Commit 2433e3f

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

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

mesa/experimental/devs/simulator.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ def setup(self, model: Model) -> None:
9393
"Has the model already been run?"
9494
)
9595
if not self.event_list.is_empty():
96-
raise ValueError(
97-
"Events already scheduled. Call setup before scheduling."
98-
)
96+
raise ValueError("Events already scheduled. Call setup before scheduling.")
9997

10098
self.model = model
10199
model._simulator = self # Register simulator with model

tests/test_devs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ def test_devs_simulator():
101101
# setup with event scheduled
102102
simulator = DEVSimulator()
103103
model = Model()
104-
simulator.event_list.add_event(
105-
SimulationEvent(1.0, Mock(), Priority.DEFAULT)
106-
)
104+
simulator.event_list.add_event(SimulationEvent(1.0, Mock(), Priority.DEFAULT))
107105
with pytest.raises(ValueError):
108106
simulator.setup(model)
109107

0 commit comments

Comments
 (0)