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

Remove unused CMS properties and fix documentation #7931

Merged
merged 6 commits into from
Apr 6, 2024

Conversation

Yay295
Copy link
Contributor

@Yay295 Yay295 commented Apr 1, 2024

The ImageCmsTransform mode properties are set here:

Pillow/src/PIL/ImageCms.py

Lines 317 to 319 in 6b676f2

# Note: inputMode and outputMode are for pyCMS compatibility only
self.input_mode = self.inputMode = input_mode
self.output_mode = self.outputMode = output_mode

Some documentation further down in that file used the wrong property names.

These values are also passed to the C code where they are used and then stored, but the stored values are not documented or used anywhere, so I've removed them.

@nulano
Copy link
Contributor

nulano commented Apr 1, 2024

the stored values are not documented or used anywhere

FWIW, there are type hints added in #7913:

@property
def inputMode(self) -> str: ...
@property
def outputMode(self) -> str: ...

@Yay295
Copy link
Contributor Author

Yay295 commented Apr 1, 2024

Ah, I didn't think to check there. And that did go in with 10.3.0 a few hours ago.

@hugovk hugovk changed the title Remove unused properties and fix documentation Remove unused CMS properties and fix documentation Apr 6, 2024
@hugovk hugovk merged commit f8ec9f7 into python-pillow:main Apr 6, 2024
58 of 59 checks passed
@hugovk
Copy link
Member

hugovk commented Apr 6, 2024

Thank you!

@Yay295 Yay295 deleted the imagingcms_modes branch April 6, 2024 06:32
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.

None yet

4 participants