diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 354f8a58e..611eacb99 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v4.5.0" + rev: "v4.6.0" hooks: - id: check-added-large-files - id: check-case-conflict @@ -16,7 +16,7 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: ["--ignore-words-list=co-ordinates,exitance,fro,hart,ist"] @@ -31,17 +31,17 @@ repos: hooks: - id: isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.14" + rev: "v0.5.4" hooks: - id: ruff-format - id: ruff - repo: https://github.com/adamchainz/blacken-docs - rev: 1.16.0 + rev: 1.18.0 hooks: - id: blacken-docs language_version: python3.10 - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.1.0" + rev: "v4.0.0-alpha.8" hooks: - id: prettier exclude: config-aces-reference.ocio.yaml diff --git a/colour/adaptation/tests/test__init__.py b/colour/adaptation/tests/test__init__.py index e27bf3878..3913219ad 100644 --- a/colour/adaptation/tests/test__init__.py +++ b/colour/adaptation/tests/test__init__.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.adaptation` module.""" - import numpy as np from colour.adaptation import chromatic_adaptation diff --git a/colour/algebra/tests/test_regression.py b/colour/algebra/tests/test_regression.py index a971cb7cd..cbe2b7706 100644 --- a/colour/algebra/tests/test_regression.py +++ b/colour/algebra/tests/test_regression.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.algebra.regression` module.""" - import numpy as np from colour.algebra import least_square_mapping_MoorePenrose diff --git a/colour/blindness/tests/test_machado2009.py b/colour/blindness/tests/test_machado2009.py index a5428d7f7..810c7d52d 100644 --- a/colour/blindness/tests/test_machado2009.py +++ b/colour/blindness/tests/test_machado2009.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.blindness.machado2009` module.""" - import numpy as np from colour.blindness import ( diff --git a/colour/colorimetry/datasets/cmfs.py b/colour/colorimetry/datasets/cmfs.py index 753d78555..f38a40cdc 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 5a7f898b9..e9ce22de3 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 12999afae..fde9e1359 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 bc13289b9..49103ab30 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/colorimetry/tests/test_correction.py b/colour/colorimetry/tests/test_correction.py index dc66a4277..030961ae1 100644 --- a/colour/colorimetry/tests/test_correction.py +++ b/colour/colorimetry/tests/test_correction.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.colorimetry.correction` module.""" - import numpy as np from colour.colorimetry import ( diff --git a/colour/colorimetry/tests/test_generation.py b/colour/colorimetry/tests/test_generation.py index 58ef5dd89..eda46d104 100644 --- a/colour/colorimetry/tests/test_generation.py +++ b/colour/colorimetry/tests/test_generation.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.colorimetry.generation` module.""" - import numpy as np from colour.colorimetry.generation import ( diff --git a/colour/colorimetry/tests/test_lefs.py b/colour/colorimetry/tests/test_lefs.py index 359e64214..987eb1b9c 100644 --- a/colour/colorimetry/tests/test_lefs.py +++ b/colour/colorimetry/tests/test_lefs.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.colorimetry.lefs` module.""" - import numpy as np from colour.colorimetry import ( diff --git a/colour/colorimetry/tests/test_lightness.py b/colour/colorimetry/tests/test_lightness.py index 449702748..907ab7977 100644 --- a/colour/colorimetry/tests/test_lightness.py +++ b/colour/colorimetry/tests/test_lightness.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.colorimetry.lightness` module.""" - import numpy as np from colour.colorimetry import ( diff --git a/colour/colorimetry/tests/test_luminance.py b/colour/colorimetry/tests/test_luminance.py index ee95beadd..da0a8456b 100644 --- a/colour/colorimetry/tests/test_luminance.py +++ b/colour/colorimetry/tests/test_luminance.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.colorimetry.luminance` module.""" - import numpy as np from colour.colorimetry import ( diff --git a/colour/colorimetry/tests/test_photometry.py b/colour/colorimetry/tests/test_photometry.py index 70c7e3e3b..c4e9abfc9 100644 --- a/colour/colorimetry/tests/test_photometry.py +++ b/colour/colorimetry/tests/test_photometry.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.colorimetry.photometry` module.""" - import numpy as np from colour.colorimetry import ( diff --git a/colour/colorimetry/tests/test_transformations.py b/colour/colorimetry/tests/test_transformations.py index 4bd50667b..d8d3ce38d 100644 --- a/colour/colorimetry/tests/test_transformations.py +++ b/colour/colorimetry/tests/test_transformations.py @@ -3,7 +3,6 @@ module. """ - import numpy as np from colour.colorimetry import ( diff --git a/colour/continuous/tests/test_abstract.py b/colour/continuous/tests/test_abstract.py index 00b22a2f5..4923ef235 100644 --- a/colour/continuous/tests/test_abstract.py +++ b/colour/continuous/tests/test_abstract.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.continuous.abstract` module.""" - from colour.continuous import AbstractContinuousFunction __author__ = "Colour Developers" diff --git a/colour/corresponding/prediction.py b/colour/corresponding/prediction.py index f6e60f408..142091c0a 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/difference/tests/test__init__.py b/colour/difference/tests/test__init__.py index 33ec2f031..310e25e5e 100644 --- a/colour/difference/tests/test__init__.py +++ b/colour/difference/tests/test__init__.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.difference` module.""" - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/difference/tests/test_cam16_ucs.py b/colour/difference/tests/test_cam16_ucs.py index 410b16469..fc428572e 100644 --- a/colour/difference/tests/test_cam16_ucs.py +++ b/colour/difference/tests/test_cam16_ucs.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.difference.cam16_ucs` module.""" - from colour.difference.tests.test_cam02_ucs import TestDelta_E_Luo2006 __author__ = "Colour Developers" diff --git a/colour/difference/tests/test_huang2015.py b/colour/difference/tests/test_huang2015.py index 41ec9b7ce..cfb6fdf15 100644 --- a/colour/difference/tests/test_huang2015.py +++ b/colour/difference/tests/test_huang2015.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.difference.huang2015` module.""" - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/difference/tests/test_stress.py b/colour/difference/tests/test_stress.py index 131c290f2..dd9ad00b7 100644 --- a/colour/difference/tests/test_stress.py +++ b/colour/difference/tests/test_stress.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.difference.stress` module.""" - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/geometry/tests/test_ellipse.py b/colour/geometry/tests/test_ellipse.py index 222205c98..9a2903fd9 100644 --- a/colour/geometry/tests/test_ellipse.py +++ b/colour/geometry/tests/test_ellipse.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.geometry.ellipse` module.""" - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/geometry/tests/test_intersection.py b/colour/geometry/tests/test_intersection.py index 884000ba9..0a809f195 100644 --- a/colour/geometry/tests/test_intersection.py +++ b/colour/geometry/tests/test_intersection.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.geometry.intersection` module.""" - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/geometry/tests/test_primitives.py b/colour/geometry/tests/test_primitives.py index 454908555..1af5b7fe8 100644 --- a/colour/geometry/tests/test_primitives.py +++ b/colour/geometry/tests/test_primitives.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.geometry.primitives` module.""" - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/geometry/tests/test_section.py b/colour/geometry/tests/test_section.py index 91447adc3..ae7f66176 100644 --- a/colour/geometry/tests/test_section.py +++ b/colour/geometry/tests/test_section.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.geometry.section` module.""" - import numpy as np import pytest diff --git a/colour/geometry/tests/test_vertices.py b/colour/geometry/tests/test_vertices.py index 4a0096b1a..1289c935f 100644 --- a/colour/geometry/tests/test_vertices.py +++ b/colour/geometry/tests/test_vertices.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.geometry.vertices` module.""" - import numpy as np import pytest diff --git a/colour/graph/tests/test_conversion.py b/colour/graph/tests/test_conversion.py index 652316b3c..50529916a 100644 --- a/colour/graph/tests/test_conversion.py +++ b/colour/graph/tests/test_conversion.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.graph.conversion` module.""" - import numpy as np import pytest diff --git a/colour/hints/__init__.py b/colour/hints/__init__.py index 4ef394fe1..73a475e7d 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/io/luts/tests/test_common.py b/colour/io/luts/tests/test_common.py index 120e76b9e..5ef5cb618 100644 --- a/colour/io/luts/tests/test_common.py +++ b/colour/io/luts/tests/test_common.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.io.luts.common` module.""" - from colour.io.luts.common import path_to_title __author__ = "Colour Developers" diff --git a/colour/models/rgb/tests/test_common.py b/colour/models/rgb/tests/test_common.py index a4face75b..e80a91834 100644 --- a/colour/models/rgb/tests/test_common.py +++ b/colour/models/rgb/tests/test_common.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.models.rgb.common` module.""" - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/tests/test_itut_h_273.py b/colour/models/rgb/tests/test_itut_h_273.py index 8d012cf34..33efe82e3 100644 --- a/colour/models/rgb/tests/test_itut_h_273.py +++ b/colour/models/rgb/tests/test_itut_h_273.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.models.rgb.itut_h_273` module.""" - from colour.models import ( describe_video_signal_colour_primaries, describe_video_signal_matrix_coefficients, diff --git a/colour/models/rgb/transfer_functions/tests/test__init__.py b/colour/models/rgb/transfer_functions/tests/test__init__.py index ff9b2d27b..bc5ee0336 100644 --- a/colour/models/rgb/transfer_functions/tests/test__init__.py +++ b/colour/models/rgb/transfer_functions/tests/test__init__.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.common` module. """ - import numpy as np import pytest diff --git a/colour/models/rgb/transfer_functions/tests/test_aces.py b/colour/models/rgb/transfer_functions/tests/test_aces.py index 5d4da46cd..19df0007a 100644 --- a/colour/models/rgb/transfer_functions/tests/test_aces.py +++ b/colour/models/rgb/transfer_functions/tests/test_aces.py @@ -3,7 +3,6 @@ module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_apple_log_profile.py b/colour/models/rgb/transfer_functions/tests/test_apple_log_profile.py index fecf6f380..ff5b9f0df 100644 --- a/colour/models/rgb/transfer_functions/tests/test_apple_log_profile.py +++ b/colour/models/rgb/transfer_functions/tests/test_apple_log_profile.py @@ -3,7 +3,6 @@ apple_log_profile` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_arib_std_b67.py b/colour/models/rgb/transfer_functions/tests/test_arib_std_b67.py index 6eaf8f4eb..fefb6a7ea 100644 --- a/colour/models/rgb/transfer_functions/tests/test_arib_std_b67.py +++ b/colour/models/rgb/transfer_functions/tests/test_arib_std_b67.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.arib_std_b67` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_arri.py b/colour/models/rgb/transfer_functions/tests/test_arri.py index 96e79bbe0..bb01441cc 100644 --- a/colour/models/rgb/transfer_functions/tests/test_arri.py +++ b/colour/models/rgb/transfer_functions/tests/test_arri.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.arri` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_blackmagic_design.py b/colour/models/rgb/transfer_functions/tests/test_blackmagic_design.py index ea5e403ce..622575596 100644 --- a/colour/models/rgb/transfer_functions/tests/test_blackmagic_design.py +++ b/colour/models/rgb/transfer_functions/tests/test_blackmagic_design.py @@ -3,7 +3,6 @@ blackmagic_design` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_canon.py b/colour/models/rgb/transfer_functions/tests/test_canon.py index 8cccb13b5..509d64754 100644 --- a/colour/models/rgb/transfer_functions/tests/test_canon.py +++ b/colour/models/rgb/transfer_functions/tests/test_canon.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.canon` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_cineon.py b/colour/models/rgb/transfer_functions/tests/test_cineon.py index 943db9cc5..63722ad26 100644 --- a/colour/models/rgb/transfer_functions/tests/test_cineon.py +++ b/colour/models/rgb/transfer_functions/tests/test_cineon.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.cineon` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_common.py b/colour/models/rgb/transfer_functions/tests/test_common.py index e13d015d2..41f9a4ff1 100644 --- a/colour/models/rgb/transfer_functions/tests/test_common.py +++ b/colour/models/rgb/transfer_functions/tests/test_common.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.common` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_davinci_intermediate.py b/colour/models/rgb/transfer_functions/tests/test_davinci_intermediate.py index a9b561c70..30bbb191c 100644 --- a/colour/models/rgb/transfer_functions/tests/test_davinci_intermediate.py +++ b/colour/models/rgb/transfer_functions/tests/test_davinci_intermediate.py @@ -3,7 +3,6 @@ davinci_intermediate` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_dcdm.py b/colour/models/rgb/transfer_functions/tests/test_dcdm.py index 32d1aae3d..4913ec832 100644 --- a/colour/models/rgb/transfer_functions/tests/test_dcdm.py +++ b/colour/models/rgb/transfer_functions/tests/test_dcdm.py @@ -3,7 +3,6 @@ module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_dicom_gsdf.py b/colour/models/rgb/transfer_functions/tests/test_dicom_gsdf.py index 71f15e3c8..4fe805e1e 100644 --- a/colour/models/rgb/transfer_functions/tests/test_dicom_gsdf.py +++ b/colour/models/rgb/transfer_functions/tests/test_dicom_gsdf.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.dicom_gsdf` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_dji_d_log.py b/colour/models/rgb/transfer_functions/tests/test_dji_d_log.py index 3cd58a211..1685e7bce 100644 --- a/colour/models/rgb/transfer_functions/tests/test_dji_d_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_dji_d_log.py @@ -3,7 +3,6 @@ dji_d_log` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_exponent.py b/colour/models/rgb/transfer_functions/tests/test_exponent.py index 6329f5b63..260a44e5e 100644 --- a/colour/models/rgb/transfer_functions/tests/test_exponent.py +++ b/colour/models/rgb/transfer_functions/tests/test_exponent.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.exponent` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_filmic_pro.py b/colour/models/rgb/transfer_functions/tests/test_filmic_pro.py index a57437aa1..adf679c91 100644 --- a/colour/models/rgb/transfer_functions/tests/test_filmic_pro.py +++ b/colour/models/rgb/transfer_functions/tests/test_filmic_pro.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.filmic_pro` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_filmlight_t_log.py b/colour/models/rgb/transfer_functions/tests/test_filmlight_t_log.py index 33b461e7f..b8545d5e1 100644 --- a/colour/models/rgb/transfer_functions/tests/test_filmlight_t_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_filmlight_t_log.py @@ -3,7 +3,6 @@ filmlight_t_log` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_fujifilm_f_log.py b/colour/models/rgb/transfer_functions/tests/test_fujifilm_f_log.py index 3d41f4868..995484070 100644 --- a/colour/models/rgb/transfer_functions/tests/test_fujifilm_f_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_fujifilm_f_log.py @@ -3,7 +3,6 @@ fujifilm_f_log` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_gamma.py b/colour/models/rgb/transfer_functions/tests/test_gamma.py index 05a7e1cb9..d7e83aca2 100644 --- a/colour/models/rgb/transfer_functions/tests/test_gamma.py +++ b/colour/models/rgb/transfer_functions/tests/test_gamma.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.gamma` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_gopro.py b/colour/models/rgb/transfer_functions/tests/test_gopro.py index 1701ae53f..8ea944ca9 100644 --- a/colour/models/rgb/transfer_functions/tests/test_gopro.py +++ b/colour/models/rgb/transfer_functions/tests/test_gopro.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.gopro` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_1361.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_1361.py index f8d3944fc..5d9e9912e 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_1361.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_1361.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.itur_bt_1361` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_1886.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_1886.py index c1bf62483..e0fdba9fd 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_1886.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_1886.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.itur_bt_1886` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_2020.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_2020.py index 06b8ebd6d..05a74cfdd 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_2020.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_2020.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.itur_bt_2020` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_2100.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_2100.py index f23021bed..e856a0741 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_2100.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_2100.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.itur_bt_2100` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_601.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_601.py index 0acf68747..5a3651ab4 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_601.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_601.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.itur_bt_601` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_709.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_709.py index 4d2065e20..4a1213037 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_709.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_709.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.itur_bt_709` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_itut_h_273.py b/colour/models/rgb/transfer_functions/tests/test_itut_h_273.py index e6c557763..0ee07ec45 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itut_h_273.py +++ b/colour/models/rgb/transfer_functions/tests/test_itut_h_273.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.itut_h_273` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_leica_l_log.py b/colour/models/rgb/transfer_functions/tests/test_leica_l_log.py index 9bd2be28d..d9f24bd56 100644 --- a/colour/models/rgb/transfer_functions/tests/test_leica_l_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_leica_l_log.py @@ -3,7 +3,6 @@ leica_l_log` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_linear.py b/colour/models/rgb/transfer_functions/tests/test_linear.py index 6c867a80c..d96254cdd 100644 --- a/colour/models/rgb/transfer_functions/tests/test_linear.py +++ b/colour/models/rgb/transfer_functions/tests/test_linear.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.linear` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_log.py b/colour/models/rgb/transfer_functions/tests/test_log.py index 28b387f00..e766727bd 100644 --- a/colour/models/rgb/transfer_functions/tests/test_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_log.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.log` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_nikon_n_log.py b/colour/models/rgb/transfer_functions/tests/test_nikon_n_log.py index e6f542a83..04e75ea83 100644 --- a/colour/models/rgb/transfer_functions/tests/test_nikon_n_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_nikon_n_log.py @@ -3,7 +3,6 @@ nikon_n_log` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_panalog.py b/colour/models/rgb/transfer_functions/tests/test_panalog.py index 782f333d9..59ba916dc 100644 --- a/colour/models/rgb/transfer_functions/tests/test_panalog.py +++ b/colour/models/rgb/transfer_functions/tests/test_panalog.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.panalog` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_panasonic_vlog.py b/colour/models/rgb/transfer_functions/tests/test_panasonic_vlog.py index b915cb865..fb6cbac08 100644 --- a/colour/models/rgb/transfer_functions/tests/test_panasonic_vlog.py +++ b/colour/models/rgb/transfer_functions/tests/test_panasonic_vlog.py @@ -3,7 +3,6 @@ panasonic_v_log` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_pivoted_log.py b/colour/models/rgb/transfer_functions/tests/test_pivoted_log.py index 10416d467..3c77826d0 100644 --- a/colour/models/rgb/transfer_functions/tests/test_pivoted_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_pivoted_log.py @@ -3,7 +3,6 @@ pivoted_log` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_red.py b/colour/models/rgb/transfer_functions/tests/test_red.py index 3e8de1374..e6e6cf654 100644 --- a/colour/models/rgb/transfer_functions/tests/test_red.py +++ b/colour/models/rgb/transfer_functions/tests/test_red.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.red` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_rimm_romm_rgb.py b/colour/models/rgb/transfer_functions/tests/test_rimm_romm_rgb.py index 4b2baa75b..727fcc736 100644 --- a/colour/models/rgb/transfer_functions/tests/test_rimm_romm_rgb.py +++ b/colour/models/rgb/transfer_functions/tests/test_rimm_romm_rgb.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.rimm_romm_rgb` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_smpte_240m.py b/colour/models/rgb/transfer_functions/tests/test_smpte_240m.py index beb8fbf6f..e60b9b16b 100644 --- a/colour/models/rgb/transfer_functions/tests/test_smpte_240m.py +++ b/colour/models/rgb/transfer_functions/tests/test_smpte_240m.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.smpte_240m` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_sony.py b/colour/models/rgb/transfer_functions/tests/test_sony.py index 184505083..c4283a9d3 100644 --- a/colour/models/rgb/transfer_functions/tests/test_sony.py +++ b/colour/models/rgb/transfer_functions/tests/test_sony.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.sony` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_srgb.py b/colour/models/rgb/transfer_functions/tests/test_srgb.py index c3425ea90..9808d4827 100644 --- a/colour/models/rgb/transfer_functions/tests/test_srgb.py +++ b/colour/models/rgb/transfer_functions/tests/test_srgb.py @@ -3,7 +3,6 @@ module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_st_2084.py b/colour/models/rgb/transfer_functions/tests/test_st_2084.py index 49e21f83b..d12b1cf81 100644 --- a/colour/models/rgb/transfer_functions/tests/test_st_2084.py +++ b/colour/models/rgb/transfer_functions/tests/test_st_2084.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.st_2084` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/rgb/transfer_functions/tests/test_viper_log.py b/colour/models/rgb/transfer_functions/tests/test_viper_log.py index df300893e..3f235ff00 100644 --- a/colour/models/rgb/transfer_functions/tests/test_viper_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_viper_log.py @@ -3,7 +3,6 @@ :mod:`colour.models.rgb.transfer_functions.viper_log` module. """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/models/tests/test_cam16_ucs.py b/colour/models/tests/test_cam16_ucs.py index 513dd350c..9c776ae2a 100644 --- a/colour/models/tests/test_cam16_ucs.py +++ b/colour/models/tests/test_cam16_ucs.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.models.cam16_ucs` module.""" - from colour.models.tests.test_cam02_ucs import ( TestJMh_CIECAM02_to_UCS_Luo2006, TestUCS_Luo2006_to_JMh_CIECAM02, diff --git a/colour/notation/munsell.py b/colour/notation/munsell.py index 5e00213ec..67fb0d0f2 100644 --- a/colour/notation/munsell.py +++ b/colour/notation/munsell.py @@ -346,9 +346,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_blindness.py b/colour/plotting/tests/test_blindness.py index 164dc0d49..77e82d004 100644 --- a/colour/plotting/tests/test_blindness.py +++ b/colour/plotting/tests/test_blindness.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.blindness` module.""" - import numpy as np from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tests/test_characterisation.py b/colour/plotting/tests/test_characterisation.py index 342d6d30f..0fa362031 100644 --- a/colour/plotting/tests/test_characterisation.py +++ b/colour/plotting/tests/test_characterisation.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.characterisation` module.""" - from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tests/test_colorimetry.py b/colour/plotting/tests/test_colorimetry.py index 990e70a0c..9b82c9405 100644 --- a/colour/plotting/tests/test_colorimetry.py +++ b/colour/plotting/tests/test_colorimetry.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.colorimetry` module.""" - from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tests/test_corresponding.py b/colour/plotting/tests/test_corresponding.py index 402a579cd..dba1bddc9 100644 --- a/colour/plotting/tests/test_corresponding.py +++ b/colour/plotting/tests/test_corresponding.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.corresponding` module.""" - from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tests/test_diagrams.py b/colour/plotting/tests/test_diagrams.py index fb81b6db0..297296d1e 100644 --- a/colour/plotting/tests/test_diagrams.py +++ b/colour/plotting/tests/test_diagrams.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.diagrams` module.""" - import pytest from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tests/test_graph.py b/colour/plotting/tests/test_graph.py index b3cd95a9f..156952a9e 100644 --- a/colour/plotting/tests/test_graph.py +++ b/colour/plotting/tests/test_graph.py @@ -1,4 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.graph` module.""" + import tempfile from colour.plotting import plot_automatic_colour_conversion_graph diff --git a/colour/plotting/tests/test_models.py b/colour/plotting/tests/test_models.py index 15f226311..4db8c4d44 100644 --- a/colour/plotting/tests/test_models.py +++ b/colour/plotting/tests/test_models.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.models` module.""" - import numpy as np import pytest from matplotlib.axes import Axes diff --git a/colour/plotting/tests/test_notation.py b/colour/plotting/tests/test_notation.py index 62715b798..61d4f5e78 100644 --- a/colour/plotting/tests/test_notation.py +++ b/colour/plotting/tests/test_notation.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.notation` module.""" - from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tests/test_phenomena.py b/colour/plotting/tests/test_phenomena.py index bfd8d7f4f..ccda103ba 100644 --- a/colour/plotting/tests/test_phenomena.py +++ b/colour/plotting/tests/test_phenomena.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.phenomena` module.""" - from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tests/test_quality.py b/colour/plotting/tests/test_quality.py index 7097a8cf5..97f5ab47e 100644 --- a/colour/plotting/tests/test_quality.py +++ b/colour/plotting/tests/test_quality.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.quality` module.""" - from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tests/test_section.py b/colour/plotting/tests/test_section.py index d7fd6cb46..8fe179919 100644 --- a/colour/plotting/tests/test_section.py +++ b/colour/plotting/tests/test_section.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.section` module.""" - from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tests/test_temperature.py b/colour/plotting/tests/test_temperature.py index 4ec12ba06..7f00cbca2 100644 --- a/colour/plotting/tests/test_temperature.py +++ b/colour/plotting/tests/test_temperature.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.temperature` module.""" - import pytest from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tests/test_volume.py b/colour/plotting/tests/test_volume.py index bbc9a8059..87c7f5e21 100644 --- a/colour/plotting/tests/test_volume.py +++ b/colour/plotting/tests/test_volume.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.volume` module.""" - import numpy as np from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/plotting/tm3018/tests/test_report.py b/colour/plotting/tm3018/tests/test_report.py index eeac2a24e..107845a6e 100644 --- a/colour/plotting/tm3018/tests/test_report.py +++ b/colour/plotting/tm3018/tests/test_report.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.plotting.tm3018.report` module.""" - from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/colour/quality/tests/test_cqs.py b/colour/quality/tests/test_cqs.py index 166a189f1..79c3ef84e 100644 --- a/colour/quality/tests/test_cqs.py +++ b/colour/quality/tests/test_cqs.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.quality.cqs` module.""" - import numpy as np from colour.colorimetry import SDS_ILLUMINANTS, SDS_LIGHT_SOURCES diff --git a/colour/quality/tests/test_tm3018.py b/colour/quality/tests/test_tm3018.py index 2242ce5ad..6d4661135 100644 --- a/colour/quality/tests/test_tm3018.py +++ b/colour/quality/tests/test_tm3018.py @@ -8,7 +8,6 @@ http://media.ies.org/docs/errata/TM-30-18_tools_etc.zip. """ - import numpy as np from colour.colorimetry import SDS_ILLUMINANTS diff --git a/colour/recovery/tests/test__init__.py b/colour/recovery/tests/test__init__.py index bbdcf3575..f0ac2d95e 100644 --- a/colour/recovery/tests/test__init__.py +++ b/colour/recovery/tests/test__init__.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.recovery` module.""" - import numpy as np from colour.colorimetry import ( diff --git a/colour/recovery/tests/test_mallett2019.py b/colour/recovery/tests/test_mallett2019.py index a14d57b3e..2603fd6ae 100644 --- a/colour/recovery/tests/test_mallett2019.py +++ b/colour/recovery/tests/test_mallett2019.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.recovery.mallett2019` module.""" - import numpy as np import pytest diff --git a/colour/recovery/tests/test_meng2015.py b/colour/recovery/tests/test_meng2015.py index cc3180a2b..7c9f625a2 100644 --- a/colour/recovery/tests/test_meng2015.py +++ b/colour/recovery/tests/test_meng2015.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.recovery.meng2015` module.""" - import numpy as np import pytest diff --git a/colour/recovery/tests/test_smits1999.py b/colour/recovery/tests/test_smits1999.py index c7221bb17..44394a2f4 100644 --- a/colour/recovery/tests/test_smits1999.py +++ b/colour/recovery/tests/test_smits1999.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.recovery.smits1999` module.""" - import numpy as np from colour.colorimetry import sd_to_XYZ_integration diff --git a/colour/utilities/common.py b/colour/utilities/common.py index 3da2cc3fd..113083c22 100644 --- a/colour/utilities/common.py +++ b/colour/utilities/common.py @@ -1591,9 +1591,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/utilities/tests/test_metrics.py b/colour/utilities/tests/test_metrics.py index 48fe7e62f..e2b575967 100644 --- a/colour/utilities/tests/test_metrics.py +++ b/colour/utilities/tests/test_metrics.py @@ -1,6 +1,5 @@ """Define the unit tests for the :mod:`colour.utilities.metrics` module.""" - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS diff --git a/colour/volume/macadam_limits.py b/colour/volume/macadam_limits.py index 14dbd2652..b6d149aa3 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) diff --git a/colour/volume/tests/test_rgb.py b/colour/volume/tests/test_rgb.py index d92949b54..23726aa9f 100644 --- a/colour/volume/tests/test_rgb.py +++ b/colour/volume/tests/test_rgb.py @@ -18,7 +18,6 @@ reproducibility-of-python-pseudo-random-numbers-across-systems-and-versions """ - import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS