Skip to content

Commit 6dd6c16

Browse files
EwoutHtpike3
authored andcommitted
DiscreteEventScheduler: Black formatting
1 parent d25c0b8 commit 6dd6c16

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mesa/time.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,9 @@ def __init__(self, model: Model, time_step: TimeT = 1) -> None:
382382
def schedule_event(self, time: TimeT, agent: Agent) -> None:
383383
"""Schedule an event for an agent at a specific time."""
384384
if time < self.time:
385-
raise ValueError(f"Scheduled time ({time}) must be >= the current time ({self.time})")
385+
raise ValueError(
386+
f"Scheduled time ({time}) must be >= the current time ({self.time})"
387+
)
386388
event = (
387389
time,
388390
self.model.random.random(),
@@ -391,7 +393,7 @@ def schedule_event(self, time: TimeT, agent: Agent) -> None:
391393
heapq.heappush(self.event_queue, event)
392394

393395
def schedule_in(self, delay: TimeT, agent: Agent) -> None:
394-
""" Schedule an event for an agent after a specified delay. """
396+
"""Schedule an event for an agent after a specified delay."""
395397
if delay < 0:
396398
raise ValueError("Delay must be non-negative")
397399
event_time = self.time + delay

0 commit comments

Comments
 (0)