Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add some types to _mathtext.py#30119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 1 commit intomatplotlib:mainfromjkseppan:mathtext-type-fix
May 30, 2025

Conversation

jkseppan
Copy link
Member

Mypy 1.16.0 flags errors here:

lib/matplotlib/_mathtext.py:2531: error: "Node" has no attribute "width" [attr-defined]
lib/matplotlib/_mathtext.py:2608: error: List item 0 has incompatible type "Kern"; expected "Hlist | Vlist" [list-item]

The check for the attribute _metrics is equivalent to checking for an
instance of Char, since only Char and its subclasses set self._metrics.

Mypy infers an unnecessarily tight type list[Hlist | Vlist] for
spaced_nucleus so we give it a more general one.

@jkseppan
Copy link
MemberAuthor

@jkseppanjkseppan mentioned this pull requestMay 29, 2025
7 tasks
@QuLogicQuLogic added this to thev3.10.4 milestoneMay 29, 2025
Mypy 1.16.0 flags errors here:lib/matplotlib/_mathtext.py:2531: error: "Node" has no attribute "width"  [attr-defined]lib/matplotlib/_mathtext.py:2608: error: List item 0 has incompatible type "Kern"; expected "Hlist | Vlist"  [list-item]The check for the attribute _metrics is equivalent to checking for aninstance of Char, since only Char and its subclasses set self._metrics.Mypy infers an unnecessarily tight type list[Hlist | Vlist] forspaced_nucleus so we give it a more general one.
@QuLogicQuLogic merged commit2918b73 intomatplotlib:mainMay 30, 2025
40 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMay 30, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.10.4
Development

Successfully merging this pull request may close these issues.

2 participants
@jkseppan@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp