Skip to content
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

Removed documentation of unused argument #8079

Merged
merged 1 commit into from
May 25, 2024

Conversation

radarhere
Copy link
Member

I see no reason to mention mode in the following docstring

Pillow/src/PIL/ImageFont.py

Lines 156 to 172 in 3c2d36e

def getbbox(self, text, *args, **kwargs):
"""
Returns bounding box (in pixels) of given text.
.. versionadded:: 9.2.0
:param text: Text to render.
:param mode: Used by some graphics drivers to indicate what mode the
driver prefers; if empty, the renderer may return either
mode. Note that the mode is always a string, to simplify
C-level implementations.
:return: ``(left, top, right, bottom)`` bounding box
"""
_string_length_check(text)
width, height = self.font.getsize(text)
return 0, 0, width, height

@hugovk hugovk merged commit 8b14ed7 into python-pillow:main May 25, 2024
56 checks passed
@radarhere radarhere deleted the imagefont branch May 25, 2024 21:34
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.

None yet

2 participants