Skip to content

Correct return type - #10436

Merged
radarhere merged 1 commit into
python-pillow:mainfrom
radarhere:return_type
Nov 6, 2026
Merged

radarhere merged 1 commit into
python-pillow:mainfrom
radarhere:return_type

Conversation

@radarhere

Copy link
Copy Markdown
Member

Taken from #9908 - core Font.getlength method returns an int, not a float.

>>> from PIL import ImageFont
>>> font = ImageFont.load_default()
>>> font.font.getlength
<built-in method getlength of Font object at 0x1077c7480>
>>> font.font.getlength("test")
1024

Co-authored-by: Aarni Koskela <akx@iki.fi>
@radarhere
radarhere enabled auto-merge (squash) November 6, 2026 04:49
@radarhere
radarhere merged commit 4fe2528 into python-pillow:main Nov 6, 2026
53 checks passed
@radarhere
radarhere deleted the return_type branch November 6, 2026 05:20
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.

1 participant