diff --git a/colour/algebra/common.py b/colour/algebra/common.py index 85c9356be3..fc95b5616c 100644 --- a/colour/algebra/common.py +++ b/colour/algebra/common.py @@ -74,16 +74,18 @@ """ -def get_sdiv_mode() -> Literal[ - "Numpy", - "Ignore", - "Warning", - "Raise", - "Ignore Zero Conversion", - "Warning Zero Conversion", - "Ignore Limit Conversion", - "Warning Limit Conversion", -]: +def get_sdiv_mode() -> ( + Literal[ + "Numpy", + "Ignore", + "Warning", + "Raise", + "Ignore Zero Conversion", + "Warning Zero Conversion", + "Ignore Limit Conversion", + "Warning Limit Conversion", + ] +): """ Return *Colour* safe division mode. diff --git a/colour/appearance/tests/test_llab.py b/colour/appearance/tests/test_llab.py index 7ce0bc1594..408ee13027 100644 --- a/colour/appearance/tests/test_llab.py +++ b/colour/appearance/tests/test_llab.py @@ -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 diff --git a/colour/characterisation/aces_it.py b/colour/characterisation/aces_it.py index 1713b4681e..7ac35a7681 100644 --- a/colour/characterisation/aces_it.py +++ b/colour/characterisation/aces_it.py @@ -864,9 +864,10 @@ def matrix_idt( | str | None = "CAT02", additional_data: bool = False, -) -> Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat, NDArrayFloat] | Tuple[ - NDArrayFloat, NDArrayFloat -]: +) -> ( + Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat, NDArrayFloat] + | Tuple[NDArrayFloat, NDArrayFloat] +): """ Compute an *Input Device Transform* (IDT) matrix for given camera *RGB* spectral sensitivities, illuminant, training data, standard observer colour diff --git a/colour/colorimetry/generation.py b/colour/colorimetry/generation.py index 481438e791..62a0c0f90f 100644 --- a/colour/colorimetry/generation.py +++ b/colour/colorimetry/generation.py @@ -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 += ( diff --git a/colour/io/luts/lut.py b/colour/io/luts/lut.py index 27c35c06ca..60b6b20c28 100644 --- a/colour/io/luts/lut.py +++ b/colour/io/luts/lut.py @@ -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) diff --git a/colour/io/tm2714.py b/colour/io/tm2714.py index 2478ffb66f..10cc79e498 100644 --- a/colour/io/tm2714.py +++ b/colour/io/tm2714.py @@ -176,7 +176,6 @@ def __init__( document_creation_date: str | None = None, comments: str | None = None, ) -> None: - self._mapping: Structure = Structure( **{ "element": "Header", @@ -923,7 +922,6 @@ def __init__( bandwidth_corrected: bool | None = None, **kwargs, ) -> None: - super().__init__(**kwargs) self._mapping: Structure = Structure( @@ -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. @@ -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. @@ -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 ) diff --git a/colour/plotting/volume.py b/colour/plotting/volume.py index 5dcc43d93c..ca67fb487a 100644 --- a/colour/plotting/volume.py +++ b/colour/plotting/volume.py @@ -600,7 +600,6 @@ def plot_RGB_colourspaces_gamuts( RGB_cf: list = [] RGB_ce: list = [] for i, colourspace in enumerate(colourspaces): - if chromatically_adapt and not np.array_equal( colourspace.whitepoint, plotting_colourspace.whitepoint ): diff --git a/colour/recovery/jakob2019.py b/colour/recovery/jakob2019.py index fe5ff82c9b..f20c9412be 100644 --- a/colour/recovery/jakob2019.py +++ b/colour/recovery/jakob2019.py @@ -201,9 +201,10 @@ def error_function( illuminant: SpectralDistribution, max_error: float | None = None, additional_data: bool = False, -) -> Tuple[float, NDArrayFloat] | Tuple[ - float, NDArrayFloat, NDArrayFloat, NDArrayFloat, NDArrayFloat -]: +) -> ( + Tuple[float, NDArrayFloat] + | Tuple[float, NDArrayFloat, NDArrayFloat, NDArrayFloat, NDArrayFloat] +): """ Compute :math:`\\Delta E_{76}` between the target colour and the colour defined by given spectral model, along with its gradient. diff --git a/colour/recovery/jiang2013.py b/colour/recovery/jiang2013.py index 42a9f7c887..b85cd96ca8 100644 --- a/colour/recovery/jiang2013.py +++ b/colour/recovery/jiang2013.py @@ -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. diff --git a/colour/utilities/array.py b/colour/utilities/array.py index bf3ec506d8..b99919e8e8 100644 --- a/colour/utilities/array.py +++ b/colour/utilities/array.py @@ -913,9 +913,9 @@ def set_default_float_dtype( """ -def get_domain_range_scale() -> Literal[ - "ignore", "reference", "1", "100" -] | str: +def get_domain_range_scale() -> ( + Literal["ignore", "reference", "1", "100"] | str +): """ Return the current *Colour* domain-range scale. The following scales are available: diff --git a/colour/utilities/deprecation.py b/colour/utilities/deprecation.py index 9bbb5276ac..d3e9dc48f5 100644 --- a/colour/utilities/deprecation.py +++ b/colour/utilities/deprecation.py @@ -360,7 +360,6 @@ def __getattr__(self, attribute: str) -> Any: if change is not None: if not isinstance(change, ObjectRemoved): - usage_warning(str(change)) return ( @@ -564,7 +563,6 @@ def handle_arguments_deprecation(changes: dict, **kwargs: Any) -> dict: continue if not isinstance(change, ArgumentRemoved): - usage_warning(str(change)) if isinstance(change, ArgumentFutureRemove):