From ffb622c0975dcc0e8992a6617b28b6e97f090325 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 22:51:25 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- colour/colorimetry/datasets/cmfs.py | 12 +- .../illuminants/chromaticity_coordinates.py | 4 +- .../datasets/illuminants/hunterlab.py | 28 +- .../light_sources/chromaticity_coordinates.py | 264 ++++++++++-------- colour/corresponding/prediction.py | 6 +- colour/hints/__init__.py | 15 +- colour/notation/munsell.py | 6 +- colour/plotting/tests/test_graph.py | 1 + colour/utilities/common.py | 5 +- colour/volume/macadam_limits.py | 6 +- 10 files changed, 184 insertions(+), 163 deletions(-) diff --git a/colour/colorimetry/datasets/cmfs.py b/colour/colorimetry/datasets/cmfs.py index 471495ef5..dc603c697 100644 --- a/colour/colorimetry/datasets/cmfs.py +++ b/colour/colorimetry/datasets/cmfs.py @@ -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) diff --git a/colour/colorimetry/datasets/illuminants/chromaticity_coordinates.py b/colour/colorimetry/datasets/illuminants/chromaticity_coordinates.py index 71039aa5c..e9cfc0fa6 100644 --- a/colour/colorimetry/datasets/illuminants/chromaticity_coordinates.py +++ b/colour/colorimetry/datasets/illuminants/chromaticity_coordinates.py @@ -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]), } diff --git a/colour/colorimetry/datasets/illuminants/hunterlab.py b/colour/colorimetry/datasets/illuminants/hunterlab.py index 9beea9ac8..a7574bb27 100644 --- a/colour/colorimetry/datasets/illuminants/hunterlab.py +++ b/colour/colorimetry/datasets/illuminants/hunterlab.py @@ -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 @@ -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 diff --git a/colour/colorimetry/datasets/light_sources/chromaticity_coordinates.py b/colour/colorimetry/datasets/light_sources/chromaticity_coordinates.py index 5db07c928..ffc9dcebe 100644 --- a/colour/colorimetry/datasets/light_sources/chromaticity_coordinates.py +++ b/colour/colorimetry/datasets/light_sources/chromaticity_coordinates.py @@ -117,9 +117,7 @@ spreadsheet for the *CIE 1964 10 Degree Standard Observer*. """ -CCS_LIGHT_SOURCES_NIST_TRADITIONAL_STANDARD_OBSERVER_2_DEGREE_CIE1931: ( - CanonicalMapping -) = CanonicalMapping( +CCS_LIGHT_SOURCES_NIST_TRADITIONAL_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = CanonicalMapping( { "Cool White FL": np.array([0.369256318971281, 0.372549878176631]), "Daylight FL": np.array([0.312662993963651, 0.331985688793009]), @@ -143,9 +141,7 @@ :cite:`Ohno2008a` """ -CCS_LIGHT_SOURCES_NIST_TRADITIONAL_STANDARD_OBSERVER_10_DEGREE_CIE1964: ( - CanonicalMapping -) = CanonicalMapping( +CCS_LIGHT_SOURCES_NIST_TRADITIONAL_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = CanonicalMapping( { "Cool White FL": np.array([0.376715047518455, 0.364576802118673]), "Daylight FL": np.array([0.317395878738965, 0.330780819136676]), @@ -165,26 +161,30 @@ *CIE 1964 10 Degree Standard Observer*. """ -CCS_LIGHT_SOURCES_NIST_LED_STANDARD_OBSERVER_2_DEGREE_CIE1931: ( - CanonicalMapping -) = CanonicalMapping( - { - "3-LED-1 (457/540/605)": np.array([0.417057686949170, 0.396262457986602]), - "3-LED-2 (473/545/616)": np.array([0.417060475566006, 0.396268120523418]), - "3-LED-2 Yellow": np.array([0.436563079184047, 0.443649619298676]), - "3-LED-3 (465/546/614)": np.array([0.380460502184482, 0.376772001481922]), - "3-LED-4 (455/547/623)": np.array([0.417067943691045, 0.396276280071757]), - "4-LED No Yellow": np.array([0.417060589301332, 0.396268153712350]), - "4-LED Yellow": np.array([0.417069637940463, 0.396276766014859]), - "4-LED-1 (461/526/576/624)": np.array([0.417067615440556, 0.396275056779587]), - "4-LED-2 (447/512/573/627)": np.array([0.417071570560054, 0.396278745130373]), - "Luxeon WW 2880": np.array([0.459088527920913, 0.432916480607903]), - "PHOS-1": np.array([0.436443167801164, 0.404616033549917]), - "PHOS-2": np.array([0.452704462198571, 0.437584543052711]), - "PHOS-3": np.array([0.436899870751359, 0.404037372134463]), - "PHOS-4": np.array([0.436936023906427, 0.404113558278629]), - "Phosphor LED YAG": np.array([0.307761817314310, 0.325268939239941]), - } +CCS_LIGHT_SOURCES_NIST_LED_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = ( + CanonicalMapping( + { + "3-LED-1 (457/540/605)": np.array([0.417057686949170, 0.396262457986602]), + "3-LED-2 (473/545/616)": np.array([0.417060475566006, 0.396268120523418]), + "3-LED-2 Yellow": np.array([0.436563079184047, 0.443649619298676]), + "3-LED-3 (465/546/614)": np.array([0.380460502184482, 0.376772001481922]), + "3-LED-4 (455/547/623)": np.array([0.417067943691045, 0.396276280071757]), + "4-LED No Yellow": np.array([0.417060589301332, 0.396268153712350]), + "4-LED Yellow": np.array([0.417069637940463, 0.396276766014859]), + "4-LED-1 (461/526/576/624)": np.array( + [0.417067615440556, 0.396275056779587] + ), + "4-LED-2 (447/512/573/627)": np.array( + [0.417071570560054, 0.396278745130373] + ), + "Luxeon WW 2880": np.array([0.459088527920913, 0.432916480607903]), + "PHOS-1": np.array([0.436443167801164, 0.404616033549917]), + "PHOS-2": np.array([0.452704462198571, 0.437584543052711]), + "PHOS-3": np.array([0.436899870751359, 0.404037372134463]), + "PHOS-4": np.array([0.436936023906427, 0.404113558278629]), + "Phosphor LED YAG": np.array([0.307761817314310, 0.325268939239941]), + } + ) ) """ Chromaticity coordinates of the LED light sources from the *NIST* @@ -192,26 +192,30 @@ *CIE 1931 2 Degree Standard Observer*. """ -CCS_LIGHT_SOURCES_NIST_LED_STANDARD_OBSERVER_10_DEGREE_CIE1964: ( - CanonicalMapping -) = CanonicalMapping( - { - "3-LED-1 (457/540/605)": np.array([0.425099988926548, 0.389451349911075]), - "3-LED-2 (473/545/616)": np.array([0.422222118774217, 0.401298495594226]), - "3-LED-2 Yellow": np.array([0.446222216139125, 0.441646464276087]), - "3-LED-3 (465/546/614)": np.array([0.387470465801936, 0.376404716015666]), - "3-LED-4 (455/547/623)": np.array([0.422865464107041, 0.388772240171637]), - "4-LED No Yellow": np.array([0.419807532952439, 0.399465294930377]), - "4-LED Yellow": np.array([0.422720601750053, 0.390284663473479]), - "4-LED-1 (461/526/576/624)": np.array([0.423899783323037, 0.394170886226971]), - "4-LED-2 (447/512/573/627)": np.array([0.421571042053867, 0.394089741928601]), - "Luxeon WW 2880": np.array([0.466639299623263, 0.430817417218051]), - "PHOS-1": np.array([0.440120001281140, 0.403135783393416]), - "PHOS-2": np.array([0.461487398870558, 0.436150294667024]), - "PHOS-3": np.array([0.440892655302172, 0.408662264402299]), - "PHOS-4": np.array([0.441760443951475, 0.407267478268879]), - "Phosphor LED YAG": np.array([0.312807834772696, 0.334180937864035]), - } +CCS_LIGHT_SOURCES_NIST_LED_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = ( + CanonicalMapping( + { + "3-LED-1 (457/540/605)": np.array([0.425099988926548, 0.389451349911075]), + "3-LED-2 (473/545/616)": np.array([0.422222118774217, 0.401298495594226]), + "3-LED-2 Yellow": np.array([0.446222216139125, 0.441646464276087]), + "3-LED-3 (465/546/614)": np.array([0.387470465801936, 0.376404716015666]), + "3-LED-4 (455/547/623)": np.array([0.422865464107041, 0.388772240171637]), + "4-LED No Yellow": np.array([0.419807532952439, 0.399465294930377]), + "4-LED Yellow": np.array([0.422720601750053, 0.390284663473479]), + "4-LED-1 (461/526/576/624)": np.array( + [0.423899783323037, 0.394170886226971] + ), + "4-LED-2 (447/512/573/627)": np.array( + [0.421571042053867, 0.394089741928601] + ), + "Luxeon WW 2880": np.array([0.466639299623263, 0.430817417218051]), + "PHOS-1": np.array([0.440120001281140, 0.403135783393416]), + "PHOS-2": np.array([0.461487398870558, 0.436150294667024]), + "PHOS-3": np.array([0.440892655302172, 0.408662264402299]), + "PHOS-4": np.array([0.441760443951475, 0.407267478268879]), + "Phosphor LED YAG": np.array([0.312807834772696, 0.334180937864035]), + } + ) ) """ Chromaticity coordinates of the LED light sources from the *NIST* @@ -219,39 +223,51 @@ *CIE 1964 10 Degree Standard Observer*. """ -CCS_LIGHT_SOURCES_NIST_PHILIPS_STANDARD_OBSERVER_2_DEGREE_CIE1931: ( - CanonicalMapping -) = CanonicalMapping( - { - "60 A/W (Soft White)": np.array([0.450730217519680, 0.408046128945005]), - "C100S54 (HPS)": np.array([0.529231515407657, 0.411370164988427]), - "C100S54C (HPS)": np.array([0.502380414374839, 0.415877299905475]), - "F32T8/TL830 (Triphosphor)": np.array([0.443250764475753, 0.409523700296928]), - "F32T8/TL835 (Triphosphor)": np.array([0.407150274569933, 0.393172743482571]), - "F32T8/TL841 (Triphosphor)": np.array([0.385376686681605, 0.390370762102806]), - "F32T8/TL850 (Triphosphor)": np.array([0.343768910392287, 0.358447436104108]), - "F32T8/TL865/PLUS (Triphosphor)": np.array( - [0.316368879615201, 0.345320790143017] - ), - "F34/CW/RS/EW (Cool White FL)": np.array( - [0.377250931364378, 0.393087658636060] - ), - "F34T12/LW/RS/EW": np.array([0.378863642993776, 0.394960629979820]), - "F34T12WW/RS/EW (Warm White FL)": np.array( - [0.438466967656789, 0.408635441565706] - ), - "F40/C50 (Broadband FL)": np.array([0.345836574973021, 0.361724450389430]), - "F40/C75 (Broadband FL)": np.array([0.299966663385220, 0.316582165804824]), - "F40/CWX (Broadband FL)": np.array([0.375037045754214, 0.360543952129462]), - "F40/DX (Broadband FL)": np.array([0.311922310746537, 0.342802103417329]), - "F40/DXTP (Delux FL)": np.array([0.313066543826958, 0.342225714484412]), - "F40/N (Natural FL)": np.array([0.376878697365115, 0.354153458302878]), - "H38HT-100 (Mercury)": np.array([0.311200590193641, 0.382944245857018]), - "H38JA-100/DX (Mercury DX)": np.array([0.389791630360359, 0.373394688931767]), - "MHC100/U/MP/3K": np.array([0.428581768670222, 0.388168915678330]), - "MHC100/U/MP/4K": np.array([0.373145253482762, 0.371366990216717]), - "SDW-T 100W/LV (Super HPS)": np.array([0.472339157938672, 0.407106330880316]), - } +CCS_LIGHT_SOURCES_NIST_PHILIPS_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = ( + CanonicalMapping( + { + "60 A/W (Soft White)": np.array([0.450730217519680, 0.408046128945005]), + "C100S54 (HPS)": np.array([0.529231515407657, 0.411370164988427]), + "C100S54C (HPS)": np.array([0.502380414374839, 0.415877299905475]), + "F32T8/TL830 (Triphosphor)": np.array( + [0.443250764475753, 0.409523700296928] + ), + "F32T8/TL835 (Triphosphor)": np.array( + [0.407150274569933, 0.393172743482571] + ), + "F32T8/TL841 (Triphosphor)": np.array( + [0.385376686681605, 0.390370762102806] + ), + "F32T8/TL850 (Triphosphor)": np.array( + [0.343768910392287, 0.358447436104108] + ), + "F32T8/TL865/PLUS (Triphosphor)": np.array( + [0.316368879615201, 0.345320790143017] + ), + "F34/CW/RS/EW (Cool White FL)": np.array( + [0.377250931364378, 0.393087658636060] + ), + "F34T12/LW/RS/EW": np.array([0.378863642993776, 0.394960629979820]), + "F34T12WW/RS/EW (Warm White FL)": np.array( + [0.438466967656789, 0.408635441565706] + ), + "F40/C50 (Broadband FL)": np.array([0.345836574973021, 0.361724450389430]), + "F40/C75 (Broadband FL)": np.array([0.299966663385220, 0.316582165804824]), + "F40/CWX (Broadband FL)": np.array([0.375037045754214, 0.360543952129462]), + "F40/DX (Broadband FL)": np.array([0.311922310746537, 0.342802103417329]), + "F40/DXTP (Delux FL)": np.array([0.313066543826958, 0.342225714484412]), + "F40/N (Natural FL)": np.array([0.376878697365115, 0.354153458302878]), + "H38HT-100 (Mercury)": np.array([0.311200590193641, 0.382944245857018]), + "H38JA-100/DX (Mercury DX)": np.array( + [0.389791630360359, 0.373394688931767] + ), + "MHC100/U/MP/3K": np.array([0.428581768670222, 0.388168915678330]), + "MHC100/U/MP/4K": np.array([0.373145253482762, 0.371366990216717]), + "SDW-T 100W/LV (Super HPS)": np.array( + [0.472339157938672, 0.407106330880316] + ), + } + ) ) """ Chromaticity coordinates of the Philips light sources from the *NIST* @@ -259,39 +275,51 @@ *CIE 1931 2 Degree Standard Observer*. """ -CCS_LIGHT_SOURCES_NIST_PHILIPS_STANDARD_OBSERVER_10_DEGREE_CIE1964: ( - CanonicalMapping -) = CanonicalMapping( - { - "60 A/W (Soft White)": np.array([0.454365604973572, 0.406573684216774]), - "C100S54 (HPS)": np.array([0.538554605063010, 0.402575827972962]), - "C100S54C (HPS)": np.array([0.509663059970892, 0.409064508209193]), - "F32T8/TL830 (Triphosphor)": np.array([0.448795219301811, 0.403574636091678]), - "F32T8/TL835 (Triphosphor)": np.array([0.412082534290652, 0.388001071127592]), - "F32T8/TL841 (Triphosphor)": np.array([0.390908619219527, 0.385290559992705]), - "F32T8/TL850 (Triphosphor)": np.array([0.347882431257452, 0.355845742210551]), - "F32T8/TL865/PLUS (Triphosphor)": np.array( - [0.320698199593768, 0.343871441043854] - ), - "F34/CW/RS/EW (Cool White FL)": np.array( - [0.386514853545337, 0.382843326097814] - ), - "F34T12/LW/RS/EW": np.array([0.389628909159399, 0.382074721889904]), - "F34T12WW/RS/EW (Warm White FL)": np.array( - [0.448395377616960, 0.395666643335296] - ), - "F40/C50 (Broadband FL)": np.array([0.349880827196884, 0.360661316491439]), - "F40/C75 (Broadband FL)": np.array([0.301988533872761, 0.318479025875818]), - "F40/CWX (Broadband FL)": np.array([0.378502309910296, 0.356371890168937]), - "F40/DX (Broadband FL)": np.array([0.316783037559153, 0.341749269085077]), - "F40/DXTP (Delux FL)": np.array([0.318774745065791, 0.339798825605488]), - "F40/N (Natural FL)": np.array([0.378833157741751, 0.350724402658646]), - "H38HT-100 (Mercury)": np.array([0.326260627082484, 0.360001095895205]), - "H38JA-100/DX (Mercury DX)": np.array([0.397058597517533, 0.356532431806974]), - "MHC100/U/MP/3K": np.array([0.431422986591898, 0.380642213887539]), - "MHC100/U/MP/4K": np.array([0.375707105948115, 0.366156465779779]), - "SDW-T 100W/LV (Super HPS)": np.array([0.476461908192661, 0.402288012403575]), - } +CCS_LIGHT_SOURCES_NIST_PHILIPS_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = ( + CanonicalMapping( + { + "60 A/W (Soft White)": np.array([0.454365604973572, 0.406573684216774]), + "C100S54 (HPS)": np.array([0.538554605063010, 0.402575827972962]), + "C100S54C (HPS)": np.array([0.509663059970892, 0.409064508209193]), + "F32T8/TL830 (Triphosphor)": np.array( + [0.448795219301811, 0.403574636091678] + ), + "F32T8/TL835 (Triphosphor)": np.array( + [0.412082534290652, 0.388001071127592] + ), + "F32T8/TL841 (Triphosphor)": np.array( + [0.390908619219527, 0.385290559992705] + ), + "F32T8/TL850 (Triphosphor)": np.array( + [0.347882431257452, 0.355845742210551] + ), + "F32T8/TL865/PLUS (Triphosphor)": np.array( + [0.320698199593768, 0.343871441043854] + ), + "F34/CW/RS/EW (Cool White FL)": np.array( + [0.386514853545337, 0.382843326097814] + ), + "F34T12/LW/RS/EW": np.array([0.389628909159399, 0.382074721889904]), + "F34T12WW/RS/EW (Warm White FL)": np.array( + [0.448395377616960, 0.395666643335296] + ), + "F40/C50 (Broadband FL)": np.array([0.349880827196884, 0.360661316491439]), + "F40/C75 (Broadband FL)": np.array([0.301988533872761, 0.318479025875818]), + "F40/CWX (Broadband FL)": np.array([0.378502309910296, 0.356371890168937]), + "F40/DX (Broadband FL)": np.array([0.316783037559153, 0.341749269085077]), + "F40/DXTP (Delux FL)": np.array([0.318774745065791, 0.339798825605488]), + "F40/N (Natural FL)": np.array([0.378833157741751, 0.350724402658646]), + "H38HT-100 (Mercury)": np.array([0.326260627082484, 0.360001095895205]), + "H38JA-100/DX (Mercury DX)": np.array( + [0.397058597517533, 0.356532431806974] + ), + "MHC100/U/MP/3K": np.array([0.431422986591898, 0.380642213887539]), + "MHC100/U/MP/4K": np.array([0.375707105948115, 0.366156465779779]), + "SDW-T 100W/LV (Super HPS)": np.array( + [0.476461908192661, 0.402288012403575] + ), + } + ) ) """ Chromaticity coordinates of the Philips light sources from the *NIST* @@ -299,9 +327,9 @@ *CIE 1964 10 Degree Standard Observer*. """ -CCS_LIGHT_SOURCES_COMMON_STANDARD_OBSERVER_2_DEGREE_CIE1931: ( - CanonicalMapping -) = CanonicalMapping({"Kinoton 75P": np.array([0.315252413629716, 0.332870794805328])}) +CCS_LIGHT_SOURCES_COMMON_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = ( + CanonicalMapping({"Kinoton 75P": np.array([0.315252413629716, 0.332870794805328])}) +) """ Chromaticity coordinates of the common light sources for the *CIE 1931 2 Degree Standard Observer*. @@ -311,9 +339,9 @@ :cite:`Houston2015a` """ -CCS_LIGHT_SOURCES_COMMON_STANDARD_OBSERVER_10_DEGREE_CIE1964: ( - CanonicalMapping -) = CanonicalMapping({"Kinoton 75P": np.array([0.317086642148234, 0.336222428041514])}) +CCS_LIGHT_SOURCES_COMMON_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = ( + CanonicalMapping({"Kinoton 75P": np.array([0.317086642148234, 0.336222428041514])}) +) """ Chromaticity coordinates of the common light sources for the *CIE 1964 10 Degree Standard Observer*. diff --git a/colour/corresponding/prediction.py b/colour/corresponding/prediction.py index 430d0e7f9..844f5b0a9 100644 --- a/colour/corresponding/prediction.py +++ b/colour/corresponding/prediction.py @@ -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( diff --git a/colour/hints/__init__.py b/colour/hints/__init__.py index 3c8761c12..e625b64ff 100644 --- a/colour/hints/__init__.py +++ b/colour/hints/__init__.py @@ -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 @@ -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 diff --git a/colour/notation/munsell.py b/colour/notation/munsell.py index 217554b5d..17fe9a9a9 100644 --- a/colour/notation/munsell.py +++ b/colour/notation/munsell.py @@ -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 diff --git a/colour/plotting/tests/test_graph.py b/colour/plotting/tests/test_graph.py index 124bc6edf..a2c79a78a 100644 --- a/colour/plotting/tests/test_graph.py +++ b/colour/plotting/tests/test_graph.py @@ -1,5 +1,6 @@ # !/usr/bin/env python """Define the unit tests for the :mod:`colour.plotting.graph` module.""" + import tempfile import unittest diff --git a/colour/utilities/common.py b/colour/utilities/common.py index 232643635..0d73f3f6c 100644 --- a/colour/utilities/common.py +++ b/colour/utilities/common.py @@ -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: """ diff --git a/colour/volume/macadam_limits.py b/colour/volume/macadam_limits.py index dcd4e73bc..70d2a9ab7 100644 --- a/colour/volume/macadam_limits.py +++ b/colour/volume/macadam_limits.py @@ -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)