Skip to content

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

Merged
srittau merged 3 commits intopython:mainfrom
srittau:fpdf2-glyph
Mar 17, 2025
Merged

[fpdf2] Make fpdf.fonts.Glyph a dataclass#13645
srittau merged 3 commits intopython:mainfrom
srittau:fpdf2-glyph

Conversation

@srittau
Copy link
Collaborator

@srittau srittau commented Mar 17, 2025

No description provided.

@github-actions

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.

@github-actions
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
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
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