mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
use SupportsFloat instead of float in _imagingcms.pyi
This commit is contained in:
parent
aef7ccda3a
commit
5355af0ddd
|
@ -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)
|
||||||
|
|
|
@ -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":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user