Skip to content

Commit c383ef0

Browse files
committed
fix: update doctest comments and variable name in visualization functions
1 parent fffb37e commit c383ef0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cellular_automata/von_neumann.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ def visualize_cellular_automaton(
373373
>>> history = simulate_von_neumann_cellular_automaton(
374374
... grid_rows=10, grid_columns=10, generations=5, random_seed=42
375375
... )
376-
>>> anim = visualize_cellular_automaton(history, interval=500)
377-
>>> isinstance(anim, animation.FuncAnimation)
376+
>>> anim = visualize_cellular_automaton(history, interval=500) # doctest: +SKIP
377+
>>> isinstance(anim, animation.FuncAnimation) # doctest: +SKIP
378378
True
379379
"""
380380
if not generation_history:
@@ -466,7 +466,7 @@ def plot_static_generations(
466466
>>> history = simulate_von_neumann_cellular_automaton(
467467
... grid_rows=5, grid_columns=5, generations=10, random_seed=42
468468
... )
469-
>>> plot_static_generations(history, generations_to_show=[0, 2, 4, 6])
469+
>>> plot_static_generations(history, generations_to_show=[0, 2, 4, 6]) # doctest: +SKIP
470470
"""
471471
if not generation_history:
472472
raise ValueError("generation_history cannot be empty")
@@ -477,7 +477,7 @@ def plot_static_generations(
477477
generations_to_show = [0, n_gens // 3, 2 * n_gens // 3, n_gens - 1]
478478

479479
n_plots = len(generations_to_show)
480-
fig, axes = plt.subplots(1, n_plots, figsize=figsize)
480+
_fig, axes = plt.subplots(1, n_plots, figsize=figsize)
481481

482482
if n_plots == 1:
483483
axes = [axes]

0 commit comments

Comments
 (0)