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 Jan 10, 2025
1 parent 48aef48 commit b5ade91
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions mesa/visualization/mpl_space_drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from matplotlib.cm import ScalarMappable
from matplotlib.collections import PatchCollection
from matplotlib.colors import LinearSegmentedColormap, Normalize, to_rgba
from matplotlib.patches import RegularPolygon, Polygon
from matplotlib.patches import Polygon, RegularPolygon

import mesa
from mesa.experimental.cell_space import (
Expand Down Expand Up @@ -501,8 +501,11 @@ def draw_continuous_space(


def draw_voronoi_grid(
space: VoronoiGrid, agent_portrayal: Callable, ax: Axes | None = None,
draw_grid: bool = True, **kwargs
space: VoronoiGrid,
agent_portrayal: Callable,
ax: Axes | None = None,
draw_grid: bool = True,
**kwargs,
):
"""Visualize a voronoi grid.
Expand Down Expand Up @@ -554,9 +557,7 @@ def setup_voroinoimesh(cells):
return mesh

if draw_grid:
ax.add_collection(
setup_voroinoimesh(space.all_cells.cells)
)
ax.add_collection(setup_voroinoimesh(space.all_cells.cells))
return ax


Expand Down

0 comments on commit b5ade91

Please sign in to comment.