Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 14, 2024
1 parent a8b3789 commit a4dbff1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion mesa/mesa_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def real_decorator(func):
def wrapper(*args, **kwargs):
# hack, because log is applied to methods, we can get
# object instance as first arguments in args
logger.debug(f"calling {classname}.{func.__name__} with {args[1::]} and {kwargs}")
logger.debug(
f"calling {classname}.{func.__name__} with {args[1::]} and {kwargs}"
)
res = func(*args, **kwargs)
return res

Expand Down
5 changes: 4 additions & 1 deletion mesa/visualization/solara_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ def do_reset():
"""Reset the model to its initial state."""
playing.value = False
running.value = True
_mesa_logger.log(10, f"creating new {model.value.__class__} instance with {model_parameters.value}")
_mesa_logger.log(
10,
f"creating new {model.value.__class__} instance with {model_parameters.value}",
)
model.value = model.value = model.value.__class__(**model_parameters.value)

@function_logger(__name__)
Expand Down

0 comments on commit a4dbff1

Please sign in to comment.