Add type hints for ImageCms by nulano · Pull Request #7913 · python-pillow/Pillow
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value is passed to PyArg_ParseTuple with the d format. Based on the documentation, my understanding was that this required a float object, not a SupportsFloat object. However, testing with Python 3.11, it seems that a SupportsFloat object is actually accepted, so I'll revert this part of the change.
(Testing with SupportsInt I do get the expected TypeError, so at least that part matches the documentation.)