Skip to content

mathtext: Fix type inconsistency with fontmaps#31437

Merged
tacaswell merged 2 commits intomatplotlib:mainfrom
QuLogic:mathtext-types
Apr 2, 2026
Merged

mathtext: Fix type inconsistency with fontmaps#31437
tacaswell merged 2 commits intomatplotlib:mainfrom
QuLogic:mathtext-types

Conversation

@QuLogic
Copy link
Copy Markdown
Member

@QuLogic QuLogic commented Apr 2, 2026

PR summary

Previously, some fontmaps used integer keys for some special font entries, but there's no reason why they can't also be strings, which should reduce the type inconsistency across the whole file.

Also, fix a couple of other type errors with strict mypy.

Fixes #31433

AI Disclosure

None

PR checklist

Previously, some fontmaps used integer keys for some special font
entries, but there's no reason why they can't also be strings, which
should reduce the type inconsistency across the whole file.

Also, fix a couple of other type errors with strict mypy.

Fixes matplotlib#31433
@QuLogic
Copy link
Copy Markdown
Member Author

QuLogic commented Apr 2, 2026

Looks like stubtest also required a fixup, as it doesn't run if it fails on mypy before it.

@tacaswell tacaswell merged commit fc6aa04 into matplotlib:main Apr 2, 2026
40 of 41 checks passed
@QuLogic QuLogic deleted the mathtext-types branch April 2, 2026 19:28
@lumberbot-app
Copy link
Copy Markdown

lumberbot-app bot commented Apr 2, 2026

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.10.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 fc6aa040a6e5d4a5bc6557f257f9102edd447b4b
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #31437: mathtext: Fix type inconsistency with fontmaps'
  1. Push to a named branch:
git push YOURFORK v3.10.x:auto-backport-of-pr-31437-on-v3.10.x
  1. Create a PR against branch v3.10.x, I would have named this PR:

"Backport PR #31437 on branch v3.10.x (mathtext: Fix type inconsistency with fontmaps)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

ksunden pushed a commit to ksunden/matplotlib that referenced this pull request Apr 3, 2026
…ontmaps

mathtext: Fix type inconsistency with fontmaps
(cherry picked from commit fc6aa04)
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.

[MNT]: Mypy error

4 participants