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

Corrected some docstrings that are using enumeration parameters #6491

Closed
wants to merge 1 commit into from
Closed

Conversation

hecent
Copy link

@hecent hecent commented Aug 10, 2022

Converted things like Dither.FLOYDSTEINBERG to PIL.Image.Dither.FLOYDSTEINBERG to match other docstrings and to as that is the correct code.

Converted things like Dither.FLOYDSTEINBERG to PIL.Image.Dither.FLOYDSTEINBERG to match other docstrings and to as that is the correct code
@hugovk
Copy link
Member

hugovk commented Aug 10, 2022

Thanks for the PR, here's an example:

Before After
image image

In both cases, they link to the same things. For example, the first link:

But the PR makes the links appear more verbose.

@hecent
Copy link
Author

hecent commented Aug 11, 2022

The PR was to make the links the same format as other docstrings like resize() or transform() and so that they better represent what you are actually supposed to write when passing the options as parameters:
If you didn't know better it seems as though they should be written as Image.quantize(method=Quantize.MEDIANCUT) from reading the docs (which I did), and is incorrect.

(https://pillow.readthedocs.io/en/stable/reference/Image.html)
image

@radarhere
Copy link
Member

#6557 has been merged instead, resolving the inconsistency by replacing PIL.Image.Resampling.NEAREST with Resampling.NEAREST.

@radarhere radarhere closed this Sep 7, 2022
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

3 participants