Skip to content

Commit 5355af0

Browse files
committed
use SupportsFloat instead of float in _imagingcms.pyi
1 parent aef7ccd commit 5355af0

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/PIL/ImageCms.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,9 +797,6 @@ def createProfile(
797797
except (TypeError, ValueError) as e:
798798
msg = f'Color temperature must be numeric, "{colorTemp}" not valid'
799799
raise PyCMSError(msg) from e
800-
else:
801-
# colorTemp is unused if colorSpace != "LAB"
802-
colorTemp = 0.0
803800

804801
try:
805802
return core.createProfile(colorSpace, colorTemp)

src/PIL/_imagingcms.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import datetime
22
import sys
3-
from typing import Literal, TypedDict
3+
from typing import Literal, SupportsFloat, TypedDict
44

55
littlecms_version: str
66

@@ -138,7 +138,7 @@ def buildProofTransform(
138138
/,
139139
) -> CmsTransform: ...
140140
def createProfile(
141-
color_space: Literal["LAB", "XYZ", "sRGB"], color_temp: float = 0.0, /
141+
color_space: Literal["LAB", "XYZ", "sRGB"], color_temp: SupportsFloat = 0.0, /
142142
) -> CmsProfile: ...
143143

144144
if sys.platform == "win32":

0 commit comments

Comments
 (0)