Skip to content

Commit a81b945

Browse files
committed
Update CmsProfile docs to match _imagingcms type stubs
1 parent abb73b5 commit a81b945

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

docs/reference/ImageCms.rst

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ can be easily displayed in a chromaticity diagram, for example).
7373
:canonical: PIL._imagingcms.CmsProfile
7474

7575
.. py:attribute:: creation_date
76-
:type: Optional[datetime.datetime]
76+
:type: datetime.datetime | None
7777

7878
Date and time this profile was first created (see 7.2.1 of ICC.1:2010).
7979

@@ -156,74 +156,74 @@ can be easily displayed in a chromaticity diagram, for example).
156156
not been calculated (see 7.2.18 of ICC.1:2010).
157157

158158
.. py:attribute:: copyright
159-
:type: Optional[str]
159+
:type: str | None
160160

161161
The text copyright information for the profile (see 9.2.21 of ICC.1:2010).
162162

163163
.. py:attribute:: manufacturer
164-
:type: Optional[str]
164+
:type: str | None
165165

166166
The (English) display string for the device manufacturer (see
167167
9.2.22 of ICC.1:2010).
168168

169169
.. py:attribute:: model
170-
:type: Optional[str]
170+
:type: str | None
171171

172172
The (English) display string for the device model of the device
173173
for which this profile is created (see 9.2.23 of ICC.1:2010).
174174

175175
.. py:attribute:: profile_description
176-
:type: Optional[str]
176+
:type: str | None
177177

178178
The (English) display string for the profile description (see
179179
9.2.41 of ICC.1:2010).
180180

181181
.. py:attribute:: target
182-
:type: Optional[str]
182+
:type: str | None
183183

184184
The name of the registered characterization data set, or the
185185
measurement data for a characterization target (see 9.2.14 of
186186
ICC.1:2010).
187187

188188
.. py:attribute:: red_colorant
189-
:type: Optional[tuple[tuple[float]]]
189+
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
190190

191191
The first column in the matrix used in matrix/TRC transforms (see 9.2.44 of ICC.1:2010).
192192

193193
The value is in the format ``((X, Y, Z), (x, y, Y))``, if available.
194194

195195
.. py:attribute:: green_colorant
196-
:type: Optional[tuple[tuple[float]]]
196+
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
197197

198198
The second column in the matrix used in matrix/TRC transforms (see 9.2.30 of ICC.1:2010).
199199

200200
The value is in the format ``((X, Y, Z), (x, y, Y))``, if available.
201201

202202
.. py:attribute:: blue_colorant
203-
:type: Optional[tuple[tuple[float]]]
203+
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
204204

205205
The third column in the matrix used in matrix/TRC transforms (see 9.2.4 of ICC.1:2010).
206206

207207
The value is in the format ``((X, Y, Z), (x, y, Y))``, if available.
208208

209209
.. py:attribute:: luminance
210-
:type: Optional[tuple[tuple[float]]]
210+
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
211211

212212
The absolute luminance of emissive devices in candelas per square
213213
metre as described by the Y channel (see 9.2.32 of ICC.1:2010).
214214

215215
The value is in the format ``((X, Y, Z), (x, y, Y))``, if available.
216216

217217
.. py:attribute:: chromaticity
218-
:type: Optional[tuple[tuple[float]]]
218+
:type: tuple[tuple[float, float, float], tuple[float, float, float], tuple[float, float, float]] | None
219219

220220
The data of the phosphor/colorant chromaticity set used (red,
221221
green and blue channels, see 9.2.16 of ICC.1:2010).
222222

223223
The value is in the format ``((x, y, Y), (x, y, Y), (x, y, Y))``, if available.
224224

225225
.. py:attribute:: chromatic_adaption
226-
:type: tuple[tuple[float]]
226+
:type: tuple[tuple[tuple[float, float, float], tuple[float, float, float], tuple[float, float, float]], tuple[tuple[float, float, float], tuple[float, float, float], tuple[float, float, float]]] | None
227227

228228
The chromatic adaption matrix converts a color measured using the
229229
actual illumination conditions and relative to the actual adopted
@@ -249,34 +249,34 @@ can be easily displayed in a chromaticity diagram, for example).
249249
9.2.19 of ICC.1:2010).
250250

251251
.. py:attribute:: colorimetric_intent
252-
:type: Optional[str]
252+
:type: str | None
253253

254254
4-character string (padded with whitespace) identifying the image
255255
state of PCS colorimetry produced using the colorimetric intent
256256
transforms (see 9.2.20 of ICC.1:2010 for details).
257257

258258
.. py:attribute:: perceptual_rendering_intent_gamut
259-
:type: Optional[str]
259+
:type: str | None
260260

261261
4-character string (padded with whitespace) identifying the (one)
262262
standard reference medium gamut (see 9.2.37 of ICC.1:2010 for
263263
details).
264264

265265
.. py:attribute:: saturation_rendering_intent_gamut
266-
:type: Optional[str]
266+
:type: str | None
267267

268268
4-character string (padded with whitespace) identifying the (one)
269269
standard reference medium gamut (see 9.2.37 of ICC.1:2010 for
270270
details).
271271

272272
.. py:attribute:: technology
273-
:type: Optional[str]
273+
:type: str | None
274274

275275
4-character string (padded with whitespace) identifying the device
276276
technology (see 9.2.47 of ICC.1:2010 for details).
277277

278278
.. py:attribute:: media_black_point
279-
:type: Optional[tuple[tuple[float]]]
279+
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
280280

281281
This tag specifies the media black point and is used for
282282
generating absolute colorimetry.
@@ -287,41 +287,41 @@ can be easily displayed in a chromaticity diagram, for example).
287287
The value is in the format ``((X, Y, Z), (x, y, Y))``, if available.
288288

289289
.. py:attribute:: media_white_point_temperature
290-
:type: Optional[float]
290+
:type: float | None
291291

292292
Calculates the white point temperature (see the LCMS documentation
293293
for more information).
294294

295295
.. py:attribute:: viewing_condition
296-
:type: Optional[str]
296+
:type: str | None
297297

298298
The (English) display string for the viewing conditions (see
299299
9.2.48 of ICC.1:2010).
300300

301301
.. py:attribute:: screening_description
302-
:type: Optional[str]
302+
:type: str | None
303303

304304
The (English) display string for the screening conditions.
305305

306306
This tag was available in ICC 3.2, but it is removed from
307307
version 4.
308308

309309
.. py:attribute:: red_primary
310-
:type: Optional[tuple[tuple[float]]]
310+
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
311311

312312
The XYZ-transformed of the RGB primary color red (1, 0, 0).
313313

314314
The value is in the format ``((X, Y, Z), (x, y, Y))``, if available.
315315

316316
.. py:attribute:: green_primary
317-
:type: Optional[tuple[tuple[float]]]
317+
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
318318

319319
The XYZ-transformed of the RGB primary color green (0, 1, 0).
320320

321321
The value is in the format ``((X, Y, Z), (x, y, Y))``, if available.
322322

323323
.. py:attribute:: blue_primary
324-
:type: Optional[tuple[tuple[float]]]
324+
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
325325

326326
The XYZ-transformed of the RGB primary color blue (0, 0, 1).
327327

@@ -334,7 +334,7 @@ can be easily displayed in a chromaticity diagram, for example).
334334
documentation on LCMS).
335335

336336
.. py:attribute:: clut
337-
:type: dict[tuple[bool]]
337+
:type: dict[int, tuple[bool, bool, bool]] | None
338338

339339
Returns a dictionary of all supported intents and directions for
340340
the CLUT model.
@@ -353,7 +353,7 @@ can be easily displayed in a chromaticity diagram, for example).
353353
that intent is supported for that direction.
354354

355355
.. py:attribute:: intent_supported
356-
:type: dict[tuple[bool]]
356+
:type: dict[int, tuple[bool, bool, bool]] | None
357357

358358
Returns a dictionary of all supported intents and directions.
359359

@@ -372,7 +372,7 @@ can be easily displayed in a chromaticity diagram, for example).
372372

373373
There is one function defined on the class:
374374

375-
.. py:method:: is_intent_supported(intent, direction)
375+
.. py:method:: is_intent_supported(intent: int, direction: int, /)
376376
377377
Returns if the intent is supported for the given direction.
378378

0 commit comments

Comments
 (0)