mesa icon indicating copy to clipboard operation
mesa copied to clipboard

Fix inaccurate docstring wording in HexSpaceDrawer._get_hexmesh

Open sangitabera opened this issue 1 week ago • 0 comments

Describe the bug

Several docstrings and comments in mesa/visualization/space_drawers.py have inaccurate wording, missing sections, or inconsistent formatting:

  • HexSpaceDrawer._get_hexmesh(): Uses "Yields list of list..." instead of "Returns a list of lists..." even though it is not a generator.
  • OrthogonalSpaceDrawer: References legacy SingleGrid and MultiGrid classes instead of OrthogonalMooreGrid and OrthogonalVonNeumannGrid.
  • NetworkSpaceDrawer.draw_matplotlib(): Implies zorder can be passed at the top level instead of inside node_kwargs and edge_kwargs.
  • VoronoiSpaceDrawer: Mixes "Voronoi diagram" and "Voronoi grid" wording, and has inaccurate horizontal/vertical line comments in _clip_line().
  • Missing & Inconsistent Sections: Missing Attributes: on BaseSpaceDrawer, missing Args:/Returns: on ContinuousSpaceDrawer.project() and VoronoiSpaceDrawer._clip_line(), and malformed Examples: blocks across methods.

Expected behavior

Docstrings and comments should accurately describe the code, follow consistent Google-style formatting, and include complete Attributes:, Args:, Returns:, and valid Examples: sections.

To Reproduce

  1. Open mesa/visualization/space_drawers.py.
  2. Inspect the docstrings and comments across the space drawer classes.

Additional context

This is a documentation-only change. No functional behavior is altered.

sangitabera avatar Nov 24 '26 05:11 sangitabera