Skip to content

Commit cc6ac98

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 47a6fda commit cc6ac98

23 files changed

+55
-83
lines changed

colour/algebra/common.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,16 @@
7171
"""
7272

7373

74-
def get_sdiv_mode() -> (
75-
Literal[
76-
"Numpy",
77-
"Ignore",
78-
"Warning",
79-
"Raise",
80-
"Ignore Zero Conversion",
81-
"Warning Zero Conversion",
82-
"Ignore Limit Conversion",
83-
"Warning Limit Conversion",
84-
]
85-
):
74+
def get_sdiv_mode() -> Literal[
75+
"Numpy",
76+
"Ignore",
77+
"Warning",
78+
"Raise",
79+
"Ignore Zero Conversion",
80+
"Warning Zero Conversion",
81+
"Ignore Limit Conversion",
82+
"Warning Limit Conversion",
83+
]:
8684
"""
8785
Return *Colour* safe division mode.
8886

colour/algebra/interpolation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,8 +1136,7 @@ def y(self, value: ArrayLike) -> None:
11361136

11371137
attest(
11381138
len(value) >= 6,
1139-
'"y" dependent variable values count must be equal to or '
1140-
"greater than 6!",
1139+
'"y" dependent variable values count must be equal to or greater than 6!',
11411140
)
11421141

11431142
self._y = value

colour/characterisation/aces_it.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,9 @@ def whitepoint_preserving_matrix(
733733
return M
734734

735735

736-
def optimisation_factory_rawtoaces_v1() -> (
737-
Tuple[NDArrayFloat, Callable, Callable, Callable]
738-
):
736+
def optimisation_factory_rawtoaces_v1() -> Tuple[
737+
NDArrayFloat, Callable, Callable, Callable
738+
]:
739739
"""
740740
Produce the objective function and *CIE XYZ* colourspace to optimisation
741741
colourspace/colour model function according to *RAW to ACES* v1.
@@ -862,9 +862,9 @@ def finaliser_function(M: ArrayLike) -> NDArrayFloat:
862862
)
863863

864864

865-
def optimisation_factory_Oklab_15() -> (
866-
Tuple[NDArrayFloat, Callable, Callable, Callable]
867-
):
865+
def optimisation_factory_Oklab_15() -> Tuple[
866+
NDArrayFloat, Callable, Callable, Callable
867+
]:
868868
"""
869869
Produce the objective function and *CIE XYZ* colourspace to optimisation
870870
colourspace/colour model function based on the *Oklab* colourspace.

colour/colorimetry/spectrum.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,8 +1883,7 @@ def display_labels(self, value: Sequence) -> None:
18831883

18841884
attest(
18851885
is_iterable(value),
1886-
f'"display_labels" property: "{value}" is not an "iterable" like '
1887-
f"object!",
1886+
f'"display_labels" property: "{value}" is not an "iterable" like object!',
18881887
)
18891888

18901889
attest(

colour/colorimetry/tristimulus_values.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,8 +1274,7 @@ def sd_to_XYZ(
12741274

12751275
if isinstance(sd, MultiSpectralDistributions):
12761276
runtime_warning(
1277-
"A multi-spectral distributions was passed, enforcing integration "
1278-
"method!"
1277+
"A multi-spectral distributions was passed, enforcing integration method!"
12791278
)
12801279
function = sd_to_XYZ_integration
12811280
else:

colour/continuous/multi_signals.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,8 +1510,7 @@ def multi_signals_unpack_data(
15101510
for signal in signals.values():
15111511
attest(
15121512
len(domain_array) == len(signal.domain),
1513-
'User "domain" length is not compatible with unpacked '
1514-
'"signals"!',
1513+
'User "domain" length is not compatible with unpacked "signals"!',
15151514
)
15161515

15171516
signal.domain = domain_array

colour/examples/models/examples_models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,7 @@
413413

414414
Lab = np.array([0.51634019, 0.15469500, 0.06289579])
415415
message_box(
416-
f'Converting to "CIE XYZ" tristimulus values from "Oklab" colourspace:\n\n'
417-
f"\t{Lab}"
416+
f'Converting to "CIE XYZ" tristimulus values from "Oklab" colourspace:\n\n\t{Lab}'
418417
)
419418
print(colour.Oklab_to_XYZ(Lab))
420419

colour/examples/models/examples_rgb.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@
7575
print("\n")
7676

7777
message_box(
78-
f"Transfer Characteristics: "
79-
f"{list(colour.TRANSFER_CHARACTERISTICS_ITUTH273.keys())}"
78+
f"Transfer Characteristics: {list(colour.TRANSFER_CHARACTERISTICS_ITUTH273.keys())}"
8079
)
8180
colour.models.describe_video_signal_transfer_characteristics(1)
8281

colour/examples/plotting/examples_colorimetry_plots.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
print("\n")
3737

3838
message_box(
39-
'Plotting "CIE Standard Illuminant "A", "B", and "C" with their '
40-
"normalised colours."
39+
'Plotting "CIE Standard Illuminant "A", "B", and "C" with their normalised colours.'
4140
)
4241
plot_multi_illuminant_sds(
4342
["A", "B", "C"],

colour/examples/plotting/examples_models_plots.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@
8787
print("\n")
8888

8989
message_box(
90-
'Plotting a single custom "RGB" colourspace in the '
91-
'"CIE 1931 Chromaticity Diagram".'
90+
'Plotting a single custom "RGB" colourspace in the "CIE 1931 Chromaticity Diagram".'
9291
)
9392
AWFUL_RGB = colour.RGB_Colourspace(
9493
"Awful RGB",
@@ -107,21 +106,18 @@
107106
print("\n")
108107

109108
message_box(
110-
'Plotting a single "RGB" colourspace encoding colour component transfer '
111-
"function."
109+
'Plotting a single "RGB" colourspace encoding colour component transfer function.'
112110
)
113111
plot_single_cctf("ITU-R BT.709")
114112

115113
print("\n")
116114

117115
message_box(
118-
'Plotting multiple "RGB" colourspaces encoding colour component transfer '
119-
"functions."
116+
'Plotting multiple "RGB" colourspaces encoding colour component transfer functions.'
120117
)
121118
plot_multi_cctfs(["ITU-R BT.709", "sRGB"])
122119

123120
message_box(
124-
'Plotting multiple "RGB" colourspaces decoding colour component transfer '
125-
"functions."
121+
'Plotting multiple "RGB" colourspaces decoding colour component transfer functions.'
126122
)
127123
plot_multi_cctfs(["ACES2065-1", "ProPhoto RGB"], cctf_decoding=True)

0 commit comments

Comments
 (0)