Skip to content

[fpdf2] Make fpdf.fonts.Glyph a dataclass #13645

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 3 commits into from
Mar 17, 2025
Merged

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Mar 17, 2025

No description provided.

This comment has been minimized.

Comment on lines 14 to 15
# Ignore stubtest weirdness "fpdf.fonts.Glyph._DT is not present at runtime"
fpdf.fonts.Glyph._DT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a mypy issue relating to https://github.com/python/mypy/blob/5c87e972d3c2c3c1f6229e1a655c4b903207dd32/mypy/plugins/dataclasses.py#L86 (at a guess, it's probably synthesizing a TypeVar and attaching it to the class body, then not ignoring the synthesized symbol when running stubtest?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably report it upstream to mypy as a stubtest bug

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit 5cd606b into python:main Mar 17, 2025
43 checks passed
@srittau srittau deleted the fpdf2-glyph branch March 17, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants