Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 9, 2023
1 parent cdb09ad commit 2fe2e0b
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 38 deletions.
1 change: 0 additions & 1 deletion colour/appearance/tests/test_llab.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def test_XYZ_to_LLAB(self):
"colour.appearance.llab.MATRIX_RGB_TO_XYZ_LLAB",
np.around(np.linalg.inv(llab.MATRIX_XYZ_TO_RGB_LLAB), decimals=4),
):

XYZ = np.array([19.01, 20.00, 21.78])
XYZ_0 = np.array([95.05, 100.00, 108.88])
Y_b = 20
Expand Down
2 changes: 1 addition & 1 deletion colour/colorimetry/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ def sd_multi_leds_Ohno2005(

sd = sd_zeros(shape)

for (peak_wavelength, fwhm_s, peak_power_ratio) in zip(
for peak_wavelength, fwhm_s, peak_power_ratio in zip(
peak_wavelengths, fwhm, peak_power_ratios
):
sd += (
Expand Down
1 change: 0 additions & 1 deletion colour/io/luts/lut.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,6 @@ def __init__(
size: ArrayLike | None = None,
comments: Sequence | None = None,
) -> None:

domain = as_float_array(optional(domain, np.array([0, 1])))
size = optional(size, 10)

Expand Down
66 changes: 35 additions & 31 deletions colour/io/tm2714.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ def __init__(
document_creation_date: str | None = None,
comments: str | None = None,
) -> None:

self._mapping: Structure = Structure(
**{
"element": "Header",
Expand Down Expand Up @@ -923,7 +922,6 @@ def __init__(
bandwidth_corrected: bool | None = None,
**kwargs,
) -> None:

super().__init__(**kwargs)

self._mapping: Structure = Structure(
Expand Down Expand Up @@ -1081,20 +1079,23 @@ def header(self, value: Header_IESTM2714):
@property
def spectral_quantity(
self,
) -> Literal[
"absorptance",
"exitance",
"flux",
"intensity",
"irradiance",
"radiance",
"reflectance",
"relative",
"transmittance",
"R-Factor",
"T-Factor",
"other",
] | None:
) -> (
Literal[
"absorptance",
"exitance",
"flux",
"intensity",
"irradiance",
"radiance",
"reflectance",
"relative",
"transmittance",
"R-Factor",
"T-Factor",
"other",
]
| None
):
"""
Getter and setter property for the spectral quantity.
Expand Down Expand Up @@ -1143,20 +1144,23 @@ def spectral_quantity(
@property
def reflection_geometry(
self,
) -> Literal[
"di:8",
"de:8",
"8:di",
"8:de",
"d:d",
"d:0",
"45a:0",
"45c:0",
"0:45a",
"45x:0",
"0:45x",
"other",
] | None:
) -> (
Literal[
"di:8",
"de:8",
"8:di",
"8:de",
"d:d",
"d:0",
"45a:0",
"45c:0",
"0:45a",
"45x:0",
"0:45x",
"other",
]
| None
):
"""
Getter and setter property for the reflection geometry.
Expand Down Expand Up @@ -1782,7 +1786,7 @@ def write(self) -> bool:
spectral_distribution = element

# Writing spectral data.
for (wavelength, value) in tstack([self.wavelengths, self.values]):
for wavelength, value in tstack([self.wavelengths, self.values]):
element_child = ElementTree.SubElement(
spectral_distribution, mapping.data.element
)
Expand Down
11 changes: 7 additions & 4 deletions colour/recovery/jiang2013.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,13 @@ def PCA_Jiang2013(
msds_camera_sensitivities: Mapping[str, MultiSpectralDistributions],
eigen_w_v_count: int | None = None,
additional_data: bool = False,
) -> Tuple[
Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat],
Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat],
] | Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat]:
) -> (
Tuple[
Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat],
Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat],
]
| Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat]
):
"""
Perform the *Principal Component Analysis* (PCA) on given camera *RGB*
sensitivities.
Expand Down

0 comments on commit 2fe2e0b

Please sign in to comment.