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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process.

You can also join us on discourse chat for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@timhoffm
timhoffm merged commit 9cc14f1 into matplotlib:main Jul 3, 2026
34 of 38 checks passed
@QuLogic QuLogic added this to the v3.11.1 milestone Jul 10, 2026
@QuLogic

QuLogic commented Jul 10, 2026

Copy link
Copy Markdown
Member

@meeseeksdev backport to v3.11.x

dstansby added a commit that referenced this pull request Jul 10, 2026
…990-on-v3.11.x

Backport PR #31990 on branch v3.11.x (DOC fix parameter name in CharacterMapping.add docstring)
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.

3 participants