use SupportsFloat instead of float in _imagingcms.pyi

This commit is contained in:
Nulano 2024-03-30 09:11:15 +01:00
parent aef7ccda3a
commit 5355af0ddd
2 changed files with 2 additions and 5 deletions

View File

@ -797,9 +797,6 @@ def createProfile(
except (TypeError, ValueError) as e: except (TypeError, ValueError) as e:
msg = f'Color temperature must be numeric, "{colorTemp}" not valid' msg = f'Color temperature must be numeric, "{colorTemp}" not valid'
raise PyCMSError(msg) from e raise PyCMSError(msg) from e
else:
# colorTemp is unused if colorSpace != "LAB"
colorTemp = 0.0
try: try:
return core.createProfile(colorSpace, colorTemp) return core.createProfile(colorSpace, colorTemp)

View File

@ -1,6 +1,6 @@
import datetime import datetime
import sys import sys
from typing import Literal, TypedDict from typing import Literal, SupportsFloat, TypedDict
littlecms_version: str littlecms_version: str
@ -138,7 +138,7 @@ def buildProofTransform(
/, /,
) -> CmsTransform: ... ) -> CmsTransform: ...
def createProfile( def createProfile(
color_space: Literal["LAB", "XYZ", "sRGB"], color_temp: float = 0.0, / color_space: Literal["LAB", "XYZ", "sRGB"], color_temp: SupportsFloat = 0.0, /
) -> CmsProfile: ... ) -> CmsProfile: ...
if sys.platform == "win32": if sys.platform == "win32":