Skip to content

Commit 40a55a0

Browse files
committed
Fix pre-commit: Format as f-strings
New requirement by ruff 0.8.x
1 parent d171789 commit 40a55a0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mesa/examples/basic/boltzmann_wealth_model/st_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
for i in range(num_ticks):
6969
model.step()
7070
my_bar.progress((i / num_ticks), text="Simulation progress")
71-
placeholder.text("Step = %d" % i)
71+
placeholder.text(f"Step = {i}")
7272
for cell in model.grid.coord_iter():
7373
cell_content, (x, y) = cell
7474
agent_count = len(cell_content)

mesa/examples/basic/conways_game_of_life/st_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
for i in range(num_ticks):
5050
model.step()
5151
my_bar.progress((i / num_ticks), text="Simulation progress")
52-
placeholder.text("Step = %d" % i)
52+
placeholder.text(f"Step = {i}")
5353
for contents, (x, y) in model.grid.coord_iter():
54-
# print('x:',x,'y:',y, 'state:',contents)
54+
# print(f"x: {x}, y: {y}, state: {contents}")
5555
selected_row = df_grid[(df_grid["x"] == x) & (df_grid["y"] == y)]
5656
df_grid.loc[selected_row.index, "state"] = (
5757
contents.state

0 commit comments

Comments
 (0)