Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TYP: Add overloads for FT2Font.get_sfnt_table #26540

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Aug 17, 2023

PR summary

This may be perhaps a bit overboard, but I don't expect these dictionaries to change structure very often.

Also, fix type of Glyph.bbox, which is a property, not a method.

PR checklist

@QuLogic QuLogic added this to the v3.8.0 milestone Aug 17, 2023
@ksunden
Copy link
Member

ksunden commented Aug 17, 2023

Stubtest does not like that the typeddicts are "public", as it sees them and not included at runtime.

You may be able to fix this with __all__, though you would probably have to include that in the C extension as well, so may not be worth it.

Prefixing the class names with _ silences the warnings.

Alternatively, you could define the Typed Dicts in a private module and import them.

@QuLogic
Copy link
Member Author

QuLogic commented Aug 17, 2023

Making them private seems the simplest, and still seems to work for mathtext.

@oscargus oscargus merged commit 7dcc416 into matplotlib:main Aug 30, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Aug 30, 2023
@QuLogic QuLogic deleted the sfnt-typing branch August 30, 2023 07:21
oscargus added a commit that referenced this pull request Aug 30, 2023
…540-on-v3.8.x

Backport PR #26540 on branch v3.8.x (TYP: Add overloads for FT2Font.get_sfnt_table)
@ksunden ksunden mentioned this pull request Sep 15, 2023
5 tasks
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