DOC fix parameter name in CharacterMapping.add docstring by eeshsaxena · Pull Request #31990 · matplotlib/matplotlib · GitHub
Skip to content

DOC fix parameter name in CharacterMapping.add docstring#31990

Merged
timhoffm merged 1 commit into
matplotlib:mainfrom
eeshsaxena:fix/docstring-param-name
Jul 3, 2026
Merged

DOC fix parameter name in CharacterMapping.add docstring#31990
timhoffm merged 1 commit into
matplotlib:mainfrom
eeshsaxena:fix/docstring-param-name

Conversation

@eeshsaxena

Copy link
Copy Markdown
Contributor

PR summary

The add method of CharacterMapping in backends/_backend_pdf_ps.py documents parameter glyph but the actual function signature uses glyph_index.

def add(self, charcode: str, glyph_index: GlyphIndexType, subset: int,
        subset_charcode: CharacterCodeType) -> None:
    """
    ...
    glyph : GlyphIndexType   # <-- wrong: should be glyph_index
    """

One-line docstring fix.

AI Disclosure

Partial - used an AST script to find parameter name mismatches between docstrings and signatures; verified the fix manually by reading the source.

PR checklist

  • [N/A] "closes #0000" (no related issue for a doc typo fix)
  • [N/A] new and changed code is tested (docstring only)
  • [N/A] plotting related features demonstrated in example
  • [N/A] New Features and API Changes noted (no API change)
  • Documentation complies with docstring guidelines

glyph -> glyph_index to match the actual function signature
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

@timhoffm timhoffm merged commit 9cc14f1 into matplotlib:main Jul 3, 2026
34 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants