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 Mar 18, 2024
1 parent b5231ef commit 13fff49
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 163 deletions.
12 changes: 6 additions & 6 deletions colour/colorimetry/datasets/cmfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3287,12 +3287,12 @@ def _CIE_2012_10_Degree_Standard_Observer():
)


MSDS_CMFS_STANDARD_OBSERVER[
"CIE 2012 2 Degree Standard Observer"
] = _CIE_2012_2_Degree_Standard_Observer
MSDS_CMFS_STANDARD_OBSERVER[
"CIE 2012 10 Degree Standard Observer"
] = _CIE_2012_10_Degree_Standard_Observer
MSDS_CMFS_STANDARD_OBSERVER["CIE 2012 2 Degree Standard Observer"] = (
_CIE_2012_2_Degree_Standard_Observer
)
MSDS_CMFS_STANDARD_OBSERVER["CIE 2012 10 Degree Standard Observer"] = (
_CIE_2012_10_Degree_Standard_Observer
)
# ----------------------------------------------------------------------------#

MSDS_CMFS = LazyCanonicalMapping(MSDS_CMFS_LMS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,7 @@
:cite:`TheAcademyofMotionPictureArtsandSciences2014q`
"""

CCS_ILLUMINANTS_BLACKMAGIC_DESIGN_STANDARD_OBSERVER_2_DEGREE_CIE1931: (
CanonicalMapping
) = CanonicalMapping(
CCS_ILLUMINANTS_BLACKMAGIC_DESIGN_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = CanonicalMapping(
{
"Blackmagic Wide Gamut": np.array([0.3127170, 0.3290312]),
}
Expand Down
28 changes: 14 additions & 14 deletions colour/colorimetry/datasets/illuminants/hunterlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
("UL 3000", np.array([107.99, 100.00, 33.91]), np.array([183.70, 37.50])),
)

TVS_ILLUMINANTS_HUNTERLAB_STANDARD_OBSERVER_2_DEGREE_CIE1931: (
CanonicalMapping
) = CanonicalMapping(
{
x[0]: Illuminant_Specification_HunterLab(*x)
for x in DATA_ILLUMINANTS_HUNTERLAB_STANDARD_OBSERVER_2_DEGREE_CIE1931
}
TVS_ILLUMINANTS_HUNTERLAB_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = (
CanonicalMapping(
{
x[0]: Illuminant_Specification_HunterLab(*x)
for x in DATA_ILLUMINANTS_HUNTERLAB_STANDARD_OBSERVER_2_DEGREE_CIE1931
}
)
)
"""
*CIE XYZ* tristimulus values of the *Hunter L,a,b* illuminants for the
Expand All @@ -89,13 +89,13 @@
("UL 3000", np.array([111.12, 100.00, 35.21]), np.array([186.30, 38.20])),
)

TVS_ILLUMINANTS_HUNTERLAB_STANDARD_OBSERVER_10_DEGREE_CIE1964: (
CanonicalMapping
) = CanonicalMapping(
{
x[0]: Illuminant_Specification_HunterLab(*x)
for x in DATA_ILLUMINANTS_HUNTERLAB_STANDARD_OBSERVER_10_DEGREE_CIE1964
}
TVS_ILLUMINANTS_HUNTERLAB_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = (
CanonicalMapping(
{
x[0]: Illuminant_Specification_HunterLab(*x)
for x in DATA_ILLUMINANTS_HUNTERLAB_STANDARD_OBSERVER_10_DEGREE_CIE1964
}
)
)
"""
*CIE XYZ* tristimulus values of the *Hunter L,a,b* illuminants for the
Expand Down
264 changes: 146 additions & 118 deletions colour/colorimetry/datasets/light_sources/chromaticity_coordinates.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions colour/corresponding/prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,9 @@ def corresponding_chromaticities_prediction_Zhai2018(
- 'vonkries': 'Von Kries'
"""
CORRESPONDING_CHROMATICITIES_PREDICTION_MODELS[
"vonkries"
] = CORRESPONDING_CHROMATICITIES_PREDICTION_MODELS["Von Kries"]
CORRESPONDING_CHROMATICITIES_PREDICTION_MODELS["vonkries"] = (
CORRESPONDING_CHROMATICITIES_PREDICTION_MODELS["Von Kries"]
)


def corresponding_chromaticities_prediction(
Expand Down
15 changes: 5 additions & 10 deletions colour/hints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,16 @@ def x(self) -> NDArray: # noqa: D102
...

@x.setter
def x(self, value: ArrayLike):
...
def x(self, value: ArrayLike): ...

@property
def y(self) -> NDArray: # noqa: D102
...

@y.setter
def y(self, value: ArrayLike):
...
def y(self, value: ArrayLike): ...

def __init__(self, *args: Any, **kwargs: Any) -> None:
... # pragma: no cover
def __init__(self, *args: Any, **kwargs: Any) -> None: ... # pragma: no cover

def __call__(self, x: ArrayLike) -> NDArray: # noqa: D102
... # pragma: no cover
Expand All @@ -173,11 +170,9 @@ def interpolator(self) -> ProtocolInterpolator: # noqa: D102
...

@interpolator.setter
def interpolator(self, value: ProtocolInterpolator):
...
def interpolator(self, value: ProtocolInterpolator): ...

def __init__(self, *args: Any, **kwargs: Any) -> None:
... # pragma: no cover
def __init__(self, *args: Any, **kwargs: Any) -> None: ... # pragma: no cover

def __call__(self, x: ArrayLike) -> NDArray: # noqa: D102
... # pragma: no cover
Expand Down
6 changes: 3 additions & 3 deletions colour/notation/munsell.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@ def _munsell_value_ASTMD1535_interpolator() -> Extrapolator:
)
extrapolator = Extrapolator(interpolator)

_CACHE_MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR[
"ASTM D1535-08 Interpolator"
] = extrapolator
_CACHE_MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR["ASTM D1535-08 Interpolator"] = (
extrapolator
)

return extrapolator

Expand Down
1 change: 1 addition & 0 deletions colour/plotting/tests/test_graph.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# !/usr/bin/env python
"""Define the unit tests for the :mod:`colour.plotting.graph` module."""

import tempfile
import unittest

Expand Down
5 changes: 2 additions & 3 deletions colour/utilities/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1586,9 +1586,8 @@ def slugify(object_: Any, allow_unicode: bool = False) -> str:
import array

def int_digest(
args: ( # noqa: ARG001
str | bytes | bytearray | memoryview | array.ArrayType[int]
),
# noqa: ARG001
args: (str | bytes | bytearray | memoryview | array.ArrayType[int]),
seed: int = 0, # noqa: ARG001
) -> int:
"""
Expand Down
6 changes: 3 additions & 3 deletions colour/volume/macadam_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ def is_within_macadam_limits(
triangulation = _CACHE_OPTIMAL_COLOUR_STIMULI_XYZ_TRIANGULATIONS.get(illuminant)

if triangulation is None:
_CACHE_OPTIMAL_COLOUR_STIMULI_XYZ_TRIANGULATIONS[illuminant] = (
triangulation
) = Delaunay(optimal_colour_stimuli)
_CACHE_OPTIMAL_COLOUR_STIMULI_XYZ_TRIANGULATIONS[illuminant] = triangulation = (
Delaunay(optimal_colour_stimuli)
)

simplex = triangulation.find_simplex(xyY_to_XYZ(xyY), tol=tolerance)
simplex = np.where(simplex >= 0, True, False)
Expand Down

0 comments on commit 13fff49

Please sign in to comment.