diff --git a/colour/adaptation/tests/test_fairchild2020.py b/colour/adaptation/tests/test_fairchild2020.py index 399b9d94d..c753b21c5 100644 --- a/colour/adaptation/tests/test_fairchild2020.py +++ b/colour/adaptation/tests/test_fairchild2020.py @@ -13,9 +13,7 @@ chromatic_adaptation_vK20, matrix_chromatic_adaptation_vk20, ) -from colour.adaptation.fairchild2020 import ( - CONDITIONS_DEGREE_OF_ADAPTATION_VK20, -) +from colour.adaptation.fairchild2020 import CONDITIONS_DEGREE_OF_ADAPTATION_VK20 from colour.constants import TOLERANCE_ABSOLUTE_TESTS from colour.utilities import domain_range_scale, ignore_numpy_errors diff --git a/colour/algebra/common.py b/colour/algebra/common.py index b98120b9b..51383a967 100644 --- a/colour/algebra/common.py +++ b/colour/algebra/common.py @@ -24,13 +24,7 @@ ) from colour.hints import Literal, cast -from colour.utilities import ( - as_float, - as_float_array, - optional, - tsplit, - validate_method, -) +from colour.utilities import as_float, as_float_array, optional, tsplit, validate_method __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/appearance/ciecam02.py b/colour/appearance/ciecam02.py index 65877cdee..71fd35c21 100644 --- a/colour/appearance/ciecam02.py +++ b/colour/appearance/ciecam02.py @@ -69,10 +69,7 @@ tstack, zeros, ) -from colour.utilities.documentation import ( - DocstringDict, - is_documentation_building, -) +from colour.utilities.documentation import DocstringDict, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/appearance/hellwig2022.py b/colour/appearance/hellwig2022.py index c8f46c234..78970e744 100644 --- a/colour/appearance/hellwig2022.py +++ b/colour/appearance/hellwig2022.py @@ -30,10 +30,7 @@ import numpy as np from colour.algebra import sdiv, sdiv_mode, spow, vecmul -from colour.appearance.cam16 import ( - MATRIX_16, - MATRIX_INVERSE_16, -) +from colour.appearance.cam16 import MATRIX_16, MATRIX_INVERSE_16 from colour.appearance.ciecam02 import ( VIEWING_CONDITIONS_CIECAM02, InductionFactors_CIECAM02, diff --git a/colour/appearance/hke.py b/colour/appearance/hke.py index 20e0db884..bdb56eb9a 100644 --- a/colour/appearance/hke.py +++ b/colour/appearance/hke.py @@ -34,12 +34,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, Literal, NDArrayFloat -from colour.utilities import ( - CanonicalMapping, - as_float_array, - tsplit, - validate_method, -) +from colour.utilities import CanonicalMapping, as_float_array, tsplit, validate_method __author__ = "Ilia Sibiryakov" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/appearance/llab.py b/colour/appearance/llab.py index 6a8d26822..315236f9e 100644 --- a/colour/appearance/llab.py +++ b/colour/appearance/llab.py @@ -32,13 +32,7 @@ import numpy as np -from colour.algebra import ( - polar_to_cartesian, - sdiv, - sdiv_mode, - spow, - vecmul, -) +from colour.algebra import polar_to_cartesian, sdiv, sdiv_mode, spow, vecmul if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat diff --git a/colour/appearance/tests/test_atd95.py b/colour/appearance/tests/test_atd95.py index 4286d3fec..5bb65a6ef 100644 --- a/colour/appearance/tests/test_atd95.py +++ b/colour/appearance/tests/test_atd95.py @@ -8,11 +8,7 @@ from colour.appearance import XYZ_to_ATD95 from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.utilities import ( - as_float_array, - domain_range_scale, - ignore_numpy_errors, -) +from colour.utilities import as_float_array, domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/appearance/tests/test_hunt.py b/colour/appearance/tests/test_hunt.py index 00dd6bdd4..f1e5f87c4 100644 --- a/colour/appearance/tests/test_hunt.py +++ b/colour/appearance/tests/test_hunt.py @@ -13,11 +13,7 @@ XYZ_to_Hunt, ) from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.utilities import ( - as_float_array, - domain_range_scale, - ignore_numpy_errors, -) +from colour.utilities import as_float_array, domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/appearance/tests/test_nayatani95.py b/colour/appearance/tests/test_nayatani95.py index 470a087ca..573de5c9d 100644 --- a/colour/appearance/tests/test_nayatani95.py +++ b/colour/appearance/tests/test_nayatani95.py @@ -8,11 +8,7 @@ from colour.appearance import XYZ_to_Nayatani95 from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.utilities import ( - as_float_array, - domain_range_scale, - ignore_numpy_errors, -) +from colour.utilities import as_float_array, domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/appearance/tests/test_rlab.py b/colour/appearance/tests/test_rlab.py index 470a087ca..573de5c9d 100644 --- a/colour/appearance/tests/test_rlab.py +++ b/colour/appearance/tests/test_rlab.py @@ -8,11 +8,7 @@ from colour.appearance import XYZ_to_Nayatani95 from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.utilities import ( - as_float_array, - domain_range_scale, - ignore_numpy_errors, -) +from colour.utilities import as_float_array, domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/blindness/machado2009.py b/colour/blindness/machado2009.py index 3cee070e1..ec986b91a 100644 --- a/colour/blindness/machado2009.py +++ b/colour/blindness/machado2009.py @@ -38,11 +38,7 @@ if typing.TYPE_CHECKING: from colour.characterisation import RGB_DisplayPrimaries -from colour.colorimetry import ( - LMS_ConeFundamentals, - SpectralShape, - reshape_msds, -) +from colour.colorimetry import LMS_ConeFundamentals, SpectralShape, reshape_msds if typing.TYPE_CHECKING: from colour.hints import ArrayLike, Literal, NDArrayFloat diff --git a/colour/characterisation/aces_it.py b/colour/characterisation/aces_it.py index dfae9928f..0d81fbc4c 100644 --- a/colour/characterisation/aces_it.py +++ b/colour/characterisation/aces_it.py @@ -62,10 +62,7 @@ from scipy.optimize import minimize from colour.adaptation import matrix_chromatic_adaptation_VonKries -from colour.algebra import ( - euclidean_distance, - vecmul, -) +from colour.algebra import euclidean_distance, vecmul from colour.characterisation import ( MSDS_ACES_RICD, RGB_CameraSensitivities, @@ -98,13 +95,7 @@ from colour.hints import cast from colour.io import read_sds_from_csv_file -from colour.models import ( - XYZ_to_Jzazbz, - XYZ_to_Lab, - XYZ_to_Oklab, - XYZ_to_xy, - xy_to_XYZ, -) +from colour.models import XYZ_to_Jzazbz, XYZ_to_Lab, XYZ_to_Oklab, XYZ_to_xy, xy_to_XYZ from colour.models.rgb import ( RGB_COLOURSPACE_ACES2065_1, RGB_Colourspace, diff --git a/colour/colorimetry/dominant.py b/colour/colorimetry/dominant.py index 32f982a57..ddc32dc02 100644 --- a/colour/colorimetry/dominant.py +++ b/colour/colorimetry/dominant.py @@ -28,19 +28,9 @@ import numpy as np import scipy.spatial.distance -from colour.algebra import ( - euclidean_distance, - sdiv, - sdiv_mode, -) -from colour.colorimetry import ( - MultiSpectralDistributions, - handle_spectral_arguments, -) -from colour.geometry import ( - extend_line_segment, - intersect_line_segments, -) +from colour.algebra import euclidean_distance, sdiv, sdiv_mode +from colour.colorimetry import MultiSpectralDistributions, handle_spectral_arguments +from colour.geometry import extend_line_segment, intersect_line_segments if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat, NDArrayInt, Tuple diff --git a/colour/colorimetry/photometry.py b/colour/colorimetry/photometry.py index e90c369c6..a005a2e18 100644 --- a/colour/colorimetry/photometry.py +++ b/colour/colorimetry/photometry.py @@ -17,11 +17,7 @@ import numpy as np -from colour.colorimetry import ( - SDS_LEFS_PHOTOPIC, - SpectralDistribution, - reshape_sd, -) +from colour.colorimetry import SDS_LEFS_PHOTOPIC, SpectralDistribution, reshape_sd from colour.constants import CONSTANT_K_M from colour.utilities import as_float_scalar, optional diff --git a/colour/colorimetry/tests/test_correction.py b/colour/colorimetry/tests/test_correction.py index 6ba8e78b6..c712025f4 100644 --- a/colour/colorimetry/tests/test_correction.py +++ b/colour/colorimetry/tests/test_correction.py @@ -4,10 +4,7 @@ import numpy as np -from colour.colorimetry import ( - SpectralDistribution, - bandpass_correction_Stearns1988, -) +from colour.colorimetry import SpectralDistribution, bandpass_correction_Stearns1988 from colour.constants import TOLERANCE_ABSOLUTE_TESTS __author__ = "Colour Developers" diff --git a/colour/colorimetry/tests/test_dominant.py b/colour/colorimetry/tests/test_dominant.py index 7f7f92a1b..5610d63b7 100644 --- a/colour/colorimetry/tests/test_dominant.py +++ b/colour/colorimetry/tests/test_dominant.py @@ -14,9 +14,7 @@ dominant_wavelength, excitation_purity, ) -from colour.colorimetry.dominant import ( - closest_spectral_locus_wavelength, -) +from colour.colorimetry.dominant import closest_spectral_locus_wavelength from colour.constants import TOLERANCE_ABSOLUTE_TESTS from colour.models import XYZ_to_xy from colour.utilities import ignore_numpy_errors diff --git a/colour/colorimetry/tests/test_yellowness.py b/colour/colorimetry/tests/test_yellowness.py index 560e50359..6cae1e594 100644 --- a/colour/colorimetry/tests/test_yellowness.py +++ b/colour/colorimetry/tests/test_yellowness.py @@ -11,10 +11,7 @@ yellowness_ASTME313, yellowness_ASTME313_alternative, ) -from colour.colorimetry.yellowness import ( - YELLOWNESS_COEFFICIENTS_ASTME313, - yellowness, -) +from colour.colorimetry.yellowness import YELLOWNESS_COEFFICIENTS_ASTME313, yellowness from colour.constants import TOLERANCE_ABSOLUTE_TESTS from colour.utilities import domain_range_scale, ignore_numpy_errors diff --git a/colour/colorimetry/whiteness.py b/colour/colorimetry/whiteness.py index 069fc9e68..6f4faa48e 100644 --- a/colour/colorimetry/whiteness.py +++ b/colour/colorimetry/whiteness.py @@ -48,6 +48,7 @@ if typing.TYPE_CHECKING: from colour.hints import Any, ArrayLike, Literal, NDArrayFloat + from colour.utilities import ( CanonicalMapping, as_float, diff --git a/colour/constants/cie.py b/colour/constants/cie.py index 5634cb555..7df09e61d 100644 --- a/colour/constants/cie.py +++ b/colour/constants/cie.py @@ -12,10 +12,7 @@ ISBN:978-0-471-39918-6 """ -from colour.utilities.documentation import ( - DocstringFloat, - is_documentation_building, -) +from colour.utilities.documentation import DocstringFloat, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/constants/codata.py b/colour/constants/codata.py index 034804df1..865cadacc 100644 --- a/colour/constants/codata.py +++ b/colour/constants/codata.py @@ -6,10 +6,7 @@ Science and Technology (CODATA). """ -from colour.utilities.documentation import ( - DocstringFloat, - is_documentation_building, -) +from colour.utilities.documentation import DocstringFloat, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/constants/common.py b/colour/constants/common.py index f8033eeb7..44e7c403e 100644 --- a/colour/constants/common.py +++ b/colour/constants/common.py @@ -13,10 +13,7 @@ import numpy as np from colour.hints import DTypeFloat, Type, cast -from colour.utilities.documentation import ( - DocstringFloat, - is_documentation_building, -) +from colour.utilities.documentation import DocstringFloat, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/continuous/signal.py b/colour/continuous/signal.py index 596512d39..4f2c6d562 100644 --- a/colour/continuous/signal.py +++ b/colour/continuous/signal.py @@ -12,17 +12,7 @@ import typing from collections.abc import Iterator, KeysView, Mapping, Sequence, ValuesView from operator import pow # noqa: A004 -from operator import ( - add, - iadd, - imul, - ipow, - isub, - itruediv, - mul, - sub, - truediv, -) +from operator import add, iadd, imul, ipow, isub, itruediv, mul, sub, truediv import numpy as np diff --git a/colour/continuous/tests/test_multi_signal.py b/colour/continuous/tests/test_multi_signal.py index a2ad76680..46822ed8d 100644 --- a/colour/continuous/tests/test_multi_signal.py +++ b/colour/continuous/tests/test_multi_signal.py @@ -8,11 +8,7 @@ import numpy as np import pytest -from colour.algebra import ( - CubicSplineInterpolator, - Extrapolator, - KernelInterpolator, -) +from colour.algebra import CubicSplineInterpolator, Extrapolator, KernelInterpolator from colour.constants import DTYPE_FLOAT_DEFAULT, TOLERANCE_ABSOLUTE_TESTS from colour.continuous import MultiSignals, Signal from colour.utilities import ( diff --git a/colour/continuous/tests/test_signal.py b/colour/continuous/tests/test_signal.py index 7043d3429..10a39ca98 100644 --- a/colour/continuous/tests/test_signal.py +++ b/colour/continuous/tests/test_signal.py @@ -8,11 +8,7 @@ import numpy as np import pytest -from colour.algebra import ( - CubicSplineInterpolator, - Extrapolator, - KernelInterpolator, -) +from colour.algebra import CubicSplineInterpolator, Extrapolator, KernelInterpolator from colour.constants import DTYPE_FLOAT_DEFAULT, TOLERANCE_ABSOLUTE_TESTS from colour.continuous import Signal from colour.utilities import ColourRuntimeWarning, attest, is_pandas_installed diff --git a/colour/corresponding/datasets/breneman1987.py b/colour/corresponding/datasets/breneman1987.py index 84fc6fa92..886947d2d 100644 --- a/colour/corresponding/datasets/breneman1987.py +++ b/colour/corresponding/datasets/breneman1987.py @@ -24,10 +24,7 @@ from colour.hints import NDArrayFloat, Tuple from colour.utilities import MixinDataclassIterable, as_float_array -from colour.utilities.documentation import ( - DocstringDict, - is_documentation_building, -) +from colour.utilities.documentation import DocstringDict, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/difference/cam16_ucs.py b/colour/difference/cam16_ucs.py index 62de1db86..ae95f7462 100644 --- a/colour/difference/cam16_ucs.py +++ b/colour/difference/cam16_ucs.py @@ -24,9 +24,7 @@ delta_E_CAM02UCS, delta_E_Luo2006, ) -from colour.models.cam16_ucs import ( - _UCS_Luo2006_callable_to_UCS_Li2017_docstring, -) +from colour.models.cam16_ucs import _UCS_Luo2006_callable_to_UCS_Li2017_docstring from colour.utilities import copy_definition __author__ = "Colour Developers" diff --git a/colour/difference/delta_e.py b/colour/difference/delta_e.py index f00a68e44..687471bd4 100644 --- a/colour/difference/delta_e.py +++ b/colour/difference/delta_e.py @@ -63,10 +63,7 @@ tsplit, zeros, ) -from colour.utilities.documentation import ( - DocstringFloat, - is_documentation_building, -) +from colour.utilities.documentation import DocstringFloat, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/difference/stress.py b/colour/difference/stress.py index 384a29a7f..3465f607a 100644 --- a/colour/difference/stress.py +++ b/colour/difference/stress.py @@ -29,12 +29,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, Literal, NDArrayFloat -from colour.utilities import ( - CanonicalMapping, - as_float, - as_float_array, - validate_method, -) +from colour.utilities import CanonicalMapping, as_float, as_float_array, validate_method __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/difference/tests/test_cam02_ucs.py b/colour/difference/tests/test_cam02_ucs.py index 7e99c2ca7..a8d5f6e64 100644 --- a/colour/difference/tests/test_cam02_ucs.py +++ b/colour/difference/tests/test_cam02_ucs.py @@ -7,11 +7,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.difference import ( - delta_E_CAM02LCD, - delta_E_CAM02SCD, - delta_E_CAM02UCS, -) +from colour.difference import delta_E_CAM02LCD, delta_E_CAM02SCD, delta_E_CAM02UCS from colour.difference.cam02_ucs import delta_E_Luo2006 from colour.models.cam02_ucs import COEFFICIENTS_UCS_LUO2006 from colour.utilities import ignore_numpy_errors diff --git a/colour/examples/plotting/examples_blindness.py b/colour/examples/plotting/examples_blindness.py index 3d3266022..6903ae561 100644 --- a/colour/examples/plotting/examples_blindness.py +++ b/colour/examples/plotting/examples_blindness.py @@ -5,11 +5,7 @@ import numpy as np import colour -from colour.plotting import ( - colour_style, - plot_cvd_simulation_Machado2009, - plot_image, -) +from colour.plotting import colour_style, plot_cvd_simulation_Machado2009, plot_image from colour.utilities.verbose import message_box ROOT_RESOURCES = os.path.join(os.path.dirname(__file__), "resources") diff --git a/colour/examples/plotting/examples_characterisation_plots.py b/colour/examples/plotting/examples_characterisation_plots.py index 119125984..b3853723f 100644 --- a/colour/examples/plotting/examples_characterisation_plots.py +++ b/colour/examples/plotting/examples_characterisation_plots.py @@ -3,11 +3,7 @@ from pprint import pprint import colour -from colour.plotting import ( - colour_style, - plot_multi_sds, - plot_single_colour_checker, -) +from colour.plotting import colour_style, plot_multi_sds, plot_single_colour_checker from colour.utilities import message_box message_box("Characterisation Plots") diff --git a/colour/examples/plotting/examples_corresponding.py b/colour/examples/plotting/examples_corresponding.py index 6935db676..ef99f59c6 100644 --- a/colour/examples/plotting/examples_corresponding.py +++ b/colour/examples/plotting/examples_corresponding.py @@ -1,9 +1,6 @@ """Showcase corresponding chromaticities prediction plotting examples.""" -from colour.plotting import ( - colour_style, - plot_corresponding_chromaticities_prediction, -) +from colour.plotting import colour_style, plot_corresponding_chromaticities_prediction from colour.utilities import message_box message_box("Corresponding Chromaticities Prediction Plots") diff --git a/colour/examples/plotting/examples_tm3018.py b/colour/examples/plotting/examples_tm3018.py index 3c462ec5d..d7502524c 100644 --- a/colour/examples/plotting/examples_tm3018.py +++ b/colour/examples/plotting/examples_tm3018.py @@ -1,10 +1,7 @@ """Showcase *ANSI/IES TM-30-18 Colour Rendition Report* plotting examples.""" import colour -from colour.plotting import ( - colour_style, - plot_single_sd_colour_rendition_report, -) +from colour.plotting import colour_style, plot_single_sd_colour_rendition_report from colour.utilities import message_box message_box("ANSI/IES TM-30-18 Colour Rendition Report") diff --git a/colour/examples/plotting/examples_volume_plots.py b/colour/examples/plotting/examples_volume_plots.py index e2e66ff45..177423c77 100644 --- a/colour/examples/plotting/examples_volume_plots.py +++ b/colour/examples/plotting/examples_volume_plots.py @@ -2,11 +2,7 @@ import numpy as np -from colour.plotting import ( - colour_style, - plot_RGB_colourspaces_gamuts, - plot_RGB_scatter, -) +from colour.plotting import colour_style, plot_RGB_colourspaces_gamuts, plot_RGB_scatter from colour.utilities import message_box message_box("Colour Models Volume and Gamut Plots") diff --git a/colour/geometry/ellipse.py b/colour/geometry/ellipse.py index 48d752ca7..75c05c50e 100644 --- a/colour/geometry/ellipse.py +++ b/colour/geometry/ellipse.py @@ -29,13 +29,7 @@ from colour.hints import ArrayLike, Literal from colour.hints import NDArrayFloat, cast -from colour.utilities import ( - CanonicalMapping, - ones, - tsplit, - tstack, - validate_method, -) +from colour.utilities import CanonicalMapping, ones, tsplit, tstack, validate_method __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/geometry/primitives.py b/colour/geometry/primitives.py index 0308ab282..00ff2b0a4 100644 --- a/colour/geometry/primitives.py +++ b/colour/geometry/primitives.py @@ -36,10 +36,7 @@ Type, ) -from colour.hints import ( - NDArrayFloat, - cast, -) +from colour.hints import NDArrayFloat, cast from colour.utilities import ( CanonicalMapping, as_int_array, diff --git a/colour/geometry/section.py b/colour/geometry/section.py index c62419f69..81ce2128e 100644 --- a/colour/geometry/section.py +++ b/colour/geometry/section.py @@ -20,12 +20,7 @@ from colour.hints import ArrayLike, Literal, NDArrayFloat from colour.hints import List, cast -from colour.utilities import ( - as_float_array, - as_float_scalar, - required, - validate_method, -) +from colour.utilities import as_float_array, as_float_scalar, required, validate_method __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/geometry/tests/test_intersection.py b/colour/geometry/tests/test_intersection.py index 18a0ede76..b8660a17d 100644 --- a/colour/geometry/tests/test_intersection.py +++ b/colour/geometry/tests/test_intersection.py @@ -5,10 +5,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.geometry import ( - extend_line_segment, - intersect_line_segments, -) +from colour.geometry import extend_line_segment, intersect_line_segments __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/geometry/tests/test_primitives.py b/colour/geometry/tests/test_primitives.py index 749803670..1daaec6f4 100644 --- a/colour/geometry/tests/test_primitives.py +++ b/colour/geometry/tests/test_primitives.py @@ -5,11 +5,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.geometry import ( - MAPPING_PLANE_TO_AXIS, - primitive_cube, - primitive_grid, -) +from colour.geometry import MAPPING_PLANE_TO_AXIS, primitive_cube, primitive_grid __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/geometry/tests/test_section.py b/colour/geometry/tests/test_section.py index 67a30fbe1..6f7395a5e 100644 --- a/colour/geometry/tests/test_section.py +++ b/colour/geometry/tests/test_section.py @@ -7,11 +7,7 @@ from colour.constants import TOLERANCE_ABSOLUTE_TESTS from colour.geometry import hull_section, primitive_cube -from colour.geometry.section import ( - close_chord, - edges_to_chord, - unique_vertices, -) +from colour.geometry.section import close_chord, edges_to_chord, unique_vertices from colour.utilities import is_trimesh_installed __author__ = "Colour Developers" diff --git a/colour/graph/conversion.py b/colour/graph/conversion.py index bfed2d44a..772839c23 100644 --- a/colour/graph/conversion.py +++ b/colour/graph/conversion.py @@ -76,10 +76,7 @@ Literal, ) -from colour.hints import ( - NDArrayFloat, - cast, -) +from colour.hints import NDArrayFloat, cast from colour.models import ( COLOURSPACE_MODELS_POLAR_CONVERSIONS, CAM02LCD_to_JMh_CIECAM02, diff --git a/colour/io/ctl.py b/colour/io/ctl.py index d472a0b17..0555be5c3 100644 --- a/colour/io/ctl.py +++ b/colour/io/ctl.py @@ -29,16 +29,9 @@ NDArrayFloat, ) -from colour.hints import ( - Sequence, -) +from colour.hints import Sequence from colour.io import as_3_channels_image, read_image, write_image -from colour.utilities import ( - as_float, - as_float_array, - optional, - required, -) +from colour.utilities import as_float, as_float_array, optional, required __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/io/fichet2021.py b/colour/io/fichet2021.py index 41532fb02..13c6f8bf1 100644 --- a/colour/io/fichet2021.py +++ b/colour/io/fichet2021.py @@ -40,12 +40,7 @@ Literal, ) -from colour.hints import ( - Dict, - NDArrayFloat, - Sequence, - Tuple, -) +from colour.hints import Dict, NDArrayFloat, Sequence, Tuple from colour.io.image import ( MAPPING_BIT_DEPTH, Image_Specification_Attribute, diff --git a/colour/io/image.py b/colour/io/image.py index 4597784bb..62fc377b7 100644 --- a/colour/io/image.py +++ b/colour/io/image.py @@ -25,10 +25,7 @@ Type, ) -from colour.hints import ( - NDArrayReal, - cast, -) +from colour.hints import NDArrayReal, cast from colour.utilities import ( CanonicalMapping, as_float_array, diff --git a/colour/io/luts/lut.py b/colour/io/luts/lut.py index a92197df2..c7373dffb 100644 --- a/colour/io/luts/lut.py +++ b/colour/io/luts/lut.py @@ -16,17 +16,7 @@ from abc import ABC, abstractmethod from copy import deepcopy from operator import pow # noqa: A004 -from operator import ( - add, - iadd, - imul, - ipow, - isub, - itruediv, - mul, - sub, - truediv, -) +from operator import add, iadd, imul, ipow, isub, itruediv, mul, sub, truediv import numpy as np from scipy.spatial import KDTree @@ -49,10 +39,7 @@ Type, ) -from colour.hints import ( - List, - cast, -) +from colour.hints import List, cast from colour.utilities import ( as_array, as_float_array, diff --git a/colour/io/luts/operator.py b/colour/io/luts/operator.py index eb0e51784..2f2e31494 100644 --- a/colour/io/luts/operator.py +++ b/colour/io/luts/operator.py @@ -26,14 +26,7 @@ Sequence, ) -from colour.utilities import ( - as_float_array, - attest, - is_iterable, - ones, - optional, - zeros, -) +from colour.utilities import as_float_array, attest, is_iterable, ones, optional, zeros __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/io/luts/sequence.py b/colour/io/luts/sequence.py index 853d77260..c980559da 100644 --- a/colour/io/luts/sequence.py +++ b/colour/io/luts/sequence.py @@ -23,9 +23,7 @@ Sequence, ) -from colour.hints import ( - ProtocolLUTSequenceItem, -) +from colour.hints import ProtocolLUTSequenceItem from colour.utilities import as_float_array, attest, is_iterable __author__ = "Colour Developers" diff --git a/colour/io/luts/tests/test_iridas_cube.py b/colour/io/luts/tests/test_iridas_cube.py index 28bdb53fd..ec050c571 100644 --- a/colour/io/luts/tests/test_iridas_cube.py +++ b/colour/io/luts/tests/test_iridas_cube.py @@ -10,12 +10,7 @@ from colour.constants import TOLERANCE_ABSOLUTE_TESTS from colour.hints import cast -from colour.io import ( - LUT1D, - LUTSequence, - read_LUT_IridasCube, - write_LUT_IridasCube, -) +from colour.io import LUT1D, LUTSequence, read_LUT_IridasCube, write_LUT_IridasCube __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/io/luts/tests/test_sony_spi3d.py b/colour/io/luts/tests/test_sony_spi3d.py index d81dfed7e..d9dab110a 100644 --- a/colour/io/luts/tests/test_sony_spi3d.py +++ b/colour/io/luts/tests/test_sony_spi3d.py @@ -9,12 +9,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.io import ( - LUT3D, - LUTSequence, - read_LUT_SonySPI3D, - write_LUT_SonySPI3D, -) +from colour.io import LUT3D, LUTSequence, read_LUT_SonySPI3D, write_LUT_SonySPI3D from colour.utilities import as_int_array __author__ = "Colour Developers" diff --git a/colour/io/tests/test_uprtek_sekonic.py b/colour/io/tests/test_uprtek_sekonic.py index 27abd551a..0c6b9cff7 100644 --- a/colour/io/tests/test_uprtek_sekonic.py +++ b/colour/io/tests/test_uprtek_sekonic.py @@ -15,10 +15,7 @@ if typing.TYPE_CHECKING: from colour.hints import Any -from colour.io import ( - SpectralDistribution_Sekonic, - SpectralDistribution_UPRTek, -) +from colour.io import SpectralDistribution_Sekonic, SpectralDistribution_UPRTek __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/cie_luv.py b/colour/models/cie_luv.py index 062ca723a..4634a4cef 100644 --- a/colour/models/cie_luv.py +++ b/colour/models/cie_luv.py @@ -35,11 +35,7 @@ import numpy as np from colour.algebra import sdiv, sdiv_mode -from colour.colorimetry import ( - CCS_ILLUMINANTS, - lightness_CIE1976, - luminance_CIE1976, -) +from colour.colorimetry import CCS_ILLUMINANTS, lightness_CIE1976, luminance_CIE1976 if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat diff --git a/colour/models/cie_ucs.py b/colour/models/cie_ucs.py index 87dedb086..ed9713876 100644 --- a/colour/models/cie_ucs.py +++ b/colour/models/cie_ucs.py @@ -33,12 +33,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.utilities import ( - from_range_1, - to_domain_1, - tsplit, - tstack, -) +from colour.utilities import from_range_1, to_domain_1, tsplit, tstack __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/cie_uvw.py b/colour/models/cie_uvw.py index c830c0016..fb5e67082 100644 --- a/colour/models/cie_uvw.py +++ b/colour/models/cie_uvw.py @@ -24,13 +24,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.models import ( - UCS_uv_to_xy, - XYZ_to_xy, - xy_to_UCS_uv, - xyY_to_xy, - xyY_to_XYZ, -) +from colour.models import UCS_uv_to_xy, XYZ_to_xy, xy_to_UCS_uv, xyY_to_xy, xyY_to_XYZ from colour.utilities import from_range_100, to_domain_100, tsplit, tstack __author__ = "Colour Developers" diff --git a/colour/models/common.py b/colour/models/common.py index ff30174f0..c2d8869ac 100644 --- a/colour/models/common.py +++ b/colour/models/common.py @@ -38,10 +38,7 @@ tsplit, tstack, ) -from colour.utilities.documentation import ( - DocstringTuple, - is_documentation_building, -) +from colour.utilities.documentation import DocstringTuple, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/hdr_cie_lab.py b/colour/models/hdr_cie_lab.py index 979b46ec3..15ad6dbbd 100644 --- a/colour/models/hdr_cie_lab.py +++ b/colour/models/hdr_cie_lab.py @@ -50,10 +50,7 @@ tstack, validate_method, ) -from colour.utilities.documentation import ( - DocstringTuple, - is_documentation_building, -) +from colour.utilities.documentation import DocstringTuple, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/hdr_ipt.py b/colour/models/hdr_ipt.py index 12565c32b..b7ef366ac 100644 --- a/colour/models/hdr_ipt.py +++ b/colour/models/hdr_ipt.py @@ -53,10 +53,7 @@ to_domain_100, validate_method, ) -from colour.utilities.documentation import ( - DocstringTuple, - is_documentation_building, -) +from colour.utilities.documentation import DocstringTuple, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/icacb.py b/colour/models/icacb.py index 2de78d6ea..272e4bcb4 100644 --- a/colour/models/icacb.py +++ b/colour/models/icacb.py @@ -23,10 +23,7 @@ from colour.hints import ArrayLike, NDArrayFloat from colour.models import Iab_to_XYZ, XYZ_to_Iab -from colour.models.rgb.transfer_functions import ( - eotf_inverse_ST2084, - eotf_ST2084, -) +from colour.models.rgb.transfer_functions import eotf_inverse_ST2084, eotf_ST2084 from colour.utilities import domain_range_scale __author__ = "Colour Developers" diff --git a/colour/models/jzazbz.py b/colour/models/jzazbz.py index aaf6e3a7d..c0e627f82 100644 --- a/colour/models/jzazbz.py +++ b/colour/models/jzazbz.py @@ -32,10 +32,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, Literal, NDArrayFloat -from colour.models.rgb.transfer_functions import ( - eotf_inverse_ST2084, - eotf_ST2084, -) +from colour.models.rgb.transfer_functions import eotf_inverse_ST2084, eotf_ST2084 from colour.models.rgb.transfer_functions.st_2084 import CONSTANTS_ST2084 from colour.utilities import ( Structure, @@ -46,10 +43,7 @@ tstack, validate_method, ) -from colour.utilities.documentation import ( - DocstringTuple, - is_documentation_building, -) +from colour.utilities.documentation import DocstringTuple, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/cmyk.py b/colour/models/rgb/cmyk.py index 057b1e696..3501b1400 100644 --- a/colour/models/rgb/cmyk.py +++ b/colour/models/rgb/cmyk.py @@ -30,13 +30,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.utilities import ( - as_float_array, - from_range_1, - to_domain_1, - tsplit, - tstack, -) +from colour.utilities import as_float_array, from_range_1, to_domain_1, tsplit, tstack __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/cylindrical.py b/colour/models/rgb/cylindrical.py index 2c6a08f7e..e9959482f 100644 --- a/colour/models/rgb/cylindrical.py +++ b/colour/models/rgb/cylindrical.py @@ -57,13 +57,7 @@ from colour.hints import NDArrayFloat from colour.hints import ArrayLike, cast -from colour.utilities import ( - as_float_array, - from_range_1, - to_domain_1, - tsplit, - tstack, -) +from colour.utilities import as_float_array, from_range_1, to_domain_1, tsplit, tstack __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/adobe_wide_gamut_rgb.py b/colour/models/rgb/datasets/adobe_wide_gamut_rgb.py index 8f79116a2..16b86544e 100644 --- a/colour/models/rgb/datasets/adobe_wide_gamut_rgb.py +++ b/colour/models/rgb/datasets/adobe_wide_gamut_rgb.py @@ -25,11 +25,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/apple_rgb.py b/colour/models/rgb/datasets/apple_rgb.py index e724953e6..aff4f5703 100644 --- a/colour/models/rgb/datasets/apple_rgb.py +++ b/colour/models/rgb/datasets/apple_rgb.py @@ -24,11 +24,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/best_rgb.py b/colour/models/rgb/datasets/best_rgb.py index 4153cf9c3..d9610009e 100644 --- a/colour/models/rgb/datasets/best_rgb.py +++ b/colour/models/rgb/datasets/best_rgb.py @@ -24,11 +24,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/beta_rgb.py b/colour/models/rgb/datasets/beta_rgb.py index 1c4b03e14..c38ef9039 100644 --- a/colour/models/rgb/datasets/beta_rgb.py +++ b/colour/models/rgb/datasets/beta_rgb.py @@ -25,11 +25,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/color_match_rgb.py b/colour/models/rgb/datasets/color_match_rgb.py index 6376ac821..ba39e2845 100644 --- a/colour/models/rgb/datasets/color_match_rgb.py +++ b/colour/models/rgb/datasets/color_match_rgb.py @@ -25,11 +25,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/dci_p3.py b/colour/models/rgb/datasets/dci_p3.py index 65f34c86e..5beffa61b 100644 --- a/colour/models/rgb/datasets/dci_p3.py +++ b/colour/models/rgb/datasets/dci_p3.py @@ -36,11 +36,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/don_rgb_4.py b/colour/models/rgb/datasets/don_rgb_4.py index a794335f6..d24df620d 100644 --- a/colour/models/rgb/datasets/don_rgb_4.py +++ b/colour/models/rgb/datasets/don_rgb_4.py @@ -24,11 +24,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/eci_rgb_v2.py b/colour/models/rgb/datasets/eci_rgb_v2.py index 97112489f..14147747c 100644 --- a/colour/models/rgb/datasets/eci_rgb_v2.py +++ b/colour/models/rgb/datasets/eci_rgb_v2.py @@ -20,11 +20,7 @@ import numpy as np -from colour.colorimetry import ( - CCS_ILLUMINANTS, - lightness_CIE1976, - luminance_CIE1976, -) +from colour.colorimetry import CCS_ILLUMINANTS, lightness_CIE1976, luminance_CIE1976 if typing.TYPE_CHECKING: from colour.hints import ( diff --git a/colour/models/rgb/datasets/ekta_space_ps5.py b/colour/models/rgb/datasets/ekta_space_ps5.py index 78c6fe6b4..0266c96d4 100644 --- a/colour/models/rgb/datasets/ekta_space_ps5.py +++ b/colour/models/rgb/datasets/ekta_space_ps5.py @@ -24,11 +24,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/itur_bt_470.py b/colour/models/rgb/datasets/itur_bt_470.py index 384abc2af..24a485a6f 100644 --- a/colour/models/rgb/datasets/itur_bt_470.py +++ b/colour/models/rgb/datasets/itur_bt_470.py @@ -28,11 +28,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/max_rgb.py b/colour/models/rgb/datasets/max_rgb.py index 935652db2..90bc96bfa 100644 --- a/colour/models/rgb/datasets/max_rgb.py +++ b/colour/models/rgb/datasets/max_rgb.py @@ -24,11 +24,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/nikon_n_gamut.py b/colour/models/rgb/datasets/nikon_n_gamut.py index 90e2efa97..618b97538 100644 --- a/colour/models/rgb/datasets/nikon_n_gamut.py +++ b/colour/models/rgb/datasets/nikon_n_gamut.py @@ -21,11 +21,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - log_decoding_NLog, - log_encoding_NLog, -) +from colour.models.rgb import RGB_Colourspace, log_decoding_NLog, log_encoding_NLog from colour.models.rgb.datasets.itur_bt_2020 import ( CCS_WHITEPOINT_BT2020, MATRIX_BT2020_TO_XYZ, diff --git a/colour/models/rgb/datasets/p3_d65.py b/colour/models/rgb/datasets/p3_d65.py index 319a4c1ef..d51f9c13d 100644 --- a/colour/models/rgb/datasets/p3_d65.py +++ b/colour/models/rgb/datasets/p3_d65.py @@ -19,11 +19,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/panasonic_v_gamut.py b/colour/models/rgb/datasets/panasonic_v_gamut.py index 171040680..917a9ddc5 100644 --- a/colour/models/rgb/datasets/panasonic_v_gamut.py +++ b/colour/models/rgb/datasets/panasonic_v_gamut.py @@ -23,11 +23,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - log_decoding_VLog, - log_encoding_VLog, -) +from colour.models.rgb import RGB_Colourspace, log_decoding_VLog, log_encoding_VLog __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/russell_rgb.py b/colour/models/rgb/datasets/russell_rgb.py index 32e538a13..5d1fc0d24 100644 --- a/colour/models/rgb/datasets/russell_rgb.py +++ b/colour/models/rgb/datasets/russell_rgb.py @@ -24,11 +24,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/smpte_c.py b/colour/models/rgb/datasets/smpte_c.py index 49751535a..e1b954b0a 100644 --- a/colour/models/rgb/datasets/smpte_c.py +++ b/colour/models/rgb/datasets/smpte_c.py @@ -26,11 +26,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/datasets/tests/test__init__.py b/colour/models/rgb/datasets/tests/test__init__.py index 96ec47bca..23781ff5c 100644 --- a/colour/models/rgb/datasets/tests/test__init__.py +++ b/colour/models/rgb/datasets/tests/test__init__.py @@ -8,10 +8,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models import ( - RGB_COLOURSPACES, - normalised_primary_matrix, -) +from colour.models import RGB_COLOURSPACES, normalised_primary_matrix from colour.utilities import ignore_numpy_errors __author__ = "Colour Developers" diff --git a/colour/models/rgb/datasets/xtreme_rgb.py b/colour/models/rgb/datasets/xtreme_rgb.py index 09d6762a8..c13f25957 100644 --- a/colour/models/rgb/datasets/xtreme_rgb.py +++ b/colour/models/rgb/datasets/xtreme_rgb.py @@ -24,11 +24,7 @@ if typing.TYPE_CHECKING: from colour.hints import NDArrayFloat -from colour.models.rgb import ( - RGB_Colourspace, - gamma_function, - normalised_primary_matrix, -) +from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/hanbury2003.py b/colour/models/rgb/hanbury2003.py index d1da75f06..76993864d 100644 --- a/colour/models/rgb/hanbury2003.py +++ b/colour/models/rgb/hanbury2003.py @@ -26,13 +26,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.utilities import ( - from_range_1, - to_domain_1, - tsplit, - tstack, - zeros, -) +from colour.utilities import from_range_1, to_domain_1, tsplit, tstack, zeros __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/ictcp.py b/colour/models/rgb/ictcp.py index 4c41b8c08..889dfc11e 100644 --- a/colour/models/rgb/ictcp.py +++ b/colour/models/rgb/ictcp.py @@ -49,11 +49,7 @@ oetf_BT2100_HLG, oetf_inverse_BT2100_HLG, ) -from colour.utilities import ( - as_float_array, - domain_range_scale, - validate_method, -) +from colour.utilities import as_float_array, domain_range_scale, validate_method __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/itut_h_273.py b/colour/models/rgb/itut_h_273.py index 82e1ecb99..470cb212f 100644 --- a/colour/models/rgb/itut_h_273.py +++ b/colour/models/rgb/itut_h_273.py @@ -148,10 +148,7 @@ oetf_SMPTE240M, ) from colour.utilities import message_box, multiline_str -from colour.utilities.documentation import ( - DocstringDict, - is_documentation_building, -) +from colour.utilities.documentation import DocstringDict, is_documentation_building __all__ = [ "COLOUR_PRIMARIES_ITUTH273", diff --git a/colour/models/rgb/rgb_colourspace.py b/colour/models/rgb/rgb_colourspace.py index 017fde38d..86edaaf46 100644 --- a/colour/models/rgb/rgb_colourspace.py +++ b/colour/models/rgb/rgb_colourspace.py @@ -43,14 +43,9 @@ NDArrayFloat, ) -from colour.hints import ( - cast, -) +from colour.hints import cast from colour.models import xy_to_xyY, xy_to_XYZ, xyY_to_XYZ -from colour.models.rgb import ( - chromatically_adapted_primaries, - normalised_primary_matrix, -) +from colour.models.rgb import chromatically_adapted_primaries, normalised_primary_matrix from colour.utilities import ( as_float_array, attest, diff --git a/colour/models/rgb/tests/test_cmyk.py b/colour/models/rgb/tests/test_cmyk.py index eb0f6a8e2..7dbe8a5b5 100644 --- a/colour/models/rgb/tests/test_cmyk.py +++ b/colour/models/rgb/tests/test_cmyk.py @@ -7,12 +7,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb.cmyk import ( - CMY_to_CMYK, - CMY_to_RGB, - CMYK_to_CMY, - RGB_to_CMY, -) +from colour.models.rgb.cmyk import CMY_to_CMYK, CMY_to_RGB, CMYK_to_CMY, RGB_to_CMY from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" diff --git a/colour/models/rgb/tests/test_ictcp.py b/colour/models/rgb/tests/test_ictcp.py index 926680bc7..572a8c043 100644 --- a/colour/models/rgb/tests/test_ictcp.py +++ b/colour/models/rgb/tests/test_ictcp.py @@ -7,12 +7,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb import ( - ICtCp_to_RGB, - ICtCp_to_XYZ, - RGB_to_ICtCp, - XYZ_to_ICtCp, -) +from colour.models.rgb import ICtCp_to_RGB, ICtCp_to_XYZ, RGB_to_ICtCp, XYZ_to_ICtCp from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" diff --git a/colour/models/rgb/transfer_functions/aces.py b/colour/models/rgb/transfer_functions/aces.py index d28c23a5f..4c5e25d00 100644 --- a/colour/models/rgb/transfer_functions/aces.py +++ b/colour/models/rgb/transfer_functions/aces.py @@ -56,13 +56,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, Literal, NDArrayFloat, NDArrayInt -from colour.utilities import ( - Structure, - as_float, - as_int, - from_range_1, - to_domain_1, -) +from colour.utilities import Structure, as_float, as_int, from_range_1, to_domain_1 __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/transfer_functions/cineon.py b/colour/models/rgb/transfer_functions/cineon.py index 703c97548..c2e688789 100644 --- a/colour/models/rgb/transfer_functions/cineon.py +++ b/colour/models/rgb/transfer_functions/cineon.py @@ -24,12 +24,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.utilities import ( - as_float, - as_float_array, - from_range_1, - to_domain_1, -) +from colour.utilities import as_float, as_float_array, from_range_1, to_domain_1 __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/transfer_functions/dicom_gsdf.py b/colour/models/rgb/transfer_functions/dicom_gsdf.py index d82822b76..30f5bf61d 100644 --- a/colour/models/rgb/transfer_functions/dicom_gsdf.py +++ b/colour/models/rgb/transfer_functions/dicom_gsdf.py @@ -32,13 +32,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat, NDArrayReal -from colour.utilities import ( - Structure, - as_float, - as_int, - from_range_1, - to_domain_1, -) +from colour.utilities import Structure, as_float, as_int, from_range_1, to_domain_1 __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/transfer_functions/exponent.py b/colour/models/rgb/transfer_functions/exponent.py index 6e584f39c..ebbf3666f 100644 --- a/colour/models/rgb/transfer_functions/exponent.py +++ b/colour/models/rgb/transfer_functions/exponent.py @@ -25,12 +25,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, Literal, NDArrayFloat -from colour.utilities import ( - as_float, - as_float_array, - validate_method, - zeros, -) +from colour.utilities import as_float, as_float_array, validate_method, zeros __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/transfer_functions/itur_bt_1361.py b/colour/models/rgb/transfer_functions/itur_bt_1361.py index d19afc817..f749059dd 100644 --- a/colour/models/rgb/transfer_functions/itur_bt_1361.py +++ b/colour/models/rgb/transfer_functions/itur_bt_1361.py @@ -29,12 +29,7 @@ from colour.hints import ArrayLike, NDArrayFloat from colour.models.rgb.transfer_functions import oetf_BT709, oetf_inverse_BT709 -from colour.utilities import ( - as_float, - domain_range_scale, - from_range_1, - to_domain_1, -) +from colour.utilities import as_float, domain_range_scale, from_range_1, to_domain_1 __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/transfer_functions/itur_bt_2100.py b/colour/models/rgb/transfer_functions/itur_bt_2100.py index 63eda9e23..08dc87c91 100644 --- a/colour/models/rgb/transfer_functions/itur_bt_2100.py +++ b/colour/models/rgb/transfer_functions/itur_bt_2100.py @@ -72,9 +72,7 @@ oetf_inverse_ARIBSTDB67, oetf_inverse_BT709, ) -from colour.models.rgb.transfer_functions.arib_std_b67 import ( - CONSTANTS_ARIBSTDB67, -) +from colour.models.rgb.transfer_functions.arib_std_b67 import CONSTANTS_ARIBSTDB67 from colour.utilities import ( CanonicalMapping, Structure, diff --git a/colour/models/rgb/transfer_functions/itur_bt_601.py b/colour/models/rgb/transfer_functions/itur_bt_601.py index e1467e1a2..f46145b82 100644 --- a/colour/models/rgb/transfer_functions/itur_bt_601.py +++ b/colour/models/rgb/transfer_functions/itur_bt_601.py @@ -29,12 +29,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.utilities import ( - as_float, - domain_range_scale, - from_range_1, - to_domain_1, -) +from colour.utilities import as_float, domain_range_scale, from_range_1, to_domain_1 __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/transfer_functions/itut_h_273.py b/colour/models/rgb/transfer_functions/itut_h_273.py index f8cd4f307..da40bb4ad 100644 --- a/colour/models/rgb/transfer_functions/itut_h_273.py +++ b/colour/models/rgb/transfer_functions/itut_h_273.py @@ -42,12 +42,7 @@ eotf_inverse_sRGB, eotf_sRGB, ) -from colour.utilities import ( - as_float, - as_float_array, - from_range_1, - to_domain_1, -) +from colour.utilities import as_float, as_float_array, from_range_1, to_domain_1 __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/transfer_functions/log.py b/colour/models/rgb/transfer_functions/log.py index 6ee2a0c43..e3ad2616d 100644 --- a/colour/models/rgb/transfer_functions/log.py +++ b/colour/models/rgb/transfer_functions/log.py @@ -50,9 +50,7 @@ NDArrayFloat, ) -from colour.hints import ( - cast, -) +from colour.hints import cast from colour.utilities import ( as_float, as_float_array, diff --git a/colour/models/rgb/transfer_functions/panalog.py b/colour/models/rgb/transfer_functions/panalog.py index 878fd3148..9b1e18f01 100644 --- a/colour/models/rgb/transfer_functions/panalog.py +++ b/colour/models/rgb/transfer_functions/panalog.py @@ -24,12 +24,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.utilities import ( - as_float, - as_float_array, - from_range_1, - to_domain_1, -) +from colour.utilities import as_float, as_float_array, from_range_1, to_domain_1 __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/transfer_functions/smpte_240m.py b/colour/models/rgb/transfer_functions/smpte_240m.py index 79ae66afd..3af8a3734 100644 --- a/colour/models/rgb/transfer_functions/smpte_240m.py +++ b/colour/models/rgb/transfer_functions/smpte_240m.py @@ -28,12 +28,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.utilities import ( - as_float, - domain_range_scale, - from_range_1, - to_domain_1, -) +from colour.utilities import as_float, domain_range_scale, from_range_1, to_domain_1 __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/transfer_functions/srgb.py b/colour/models/rgb/transfer_functions/srgb.py index 3db8ffc5c..f8bb89dd6 100644 --- a/colour/models/rgb/transfer_functions/srgb.py +++ b/colour/models/rgb/transfer_functions/srgb.py @@ -34,12 +34,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.utilities import ( - as_float, - domain_range_scale, - from_range_1, - to_domain_1, -) +from colour.utilities import as_float, domain_range_scale, from_range_1, to_domain_1 __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/models/rgb/transfer_functions/tests/test_common.py b/colour/models/rgb/transfer_functions/tests/test_common.py index a72b52206..18f68848b 100644 --- a/colour/models/rgb/transfer_functions/tests/test_common.py +++ b/colour/models/rgb/transfer_functions/tests/test_common.py @@ -6,11 +6,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb.transfer_functions import ( - CV_range, - full_to_legal, - legal_to_full, -) +from colour.models.rgb.transfer_functions import CV_range, full_to_legal, legal_to_full from colour.utilities import ignore_numpy_errors __author__ = "Colour Developers" 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 854d7865f..7f97dd206 100644 --- a/colour/models/rgb/transfer_functions/tests/test_dicom_gsdf.py +++ b/colour/models/rgb/transfer_functions/tests/test_dicom_gsdf.py @@ -6,10 +6,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb.transfer_functions import ( - eotf_DICOMGSDF, - eotf_inverse_DICOMGSDF, -) +from colour.models.rgb.transfer_functions import eotf_DICOMGSDF, eotf_inverse_DICOMGSDF from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" 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 d378c2e7e..99362056e 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 @@ -6,10 +6,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb.transfer_functions import ( - oetf_BT1361, - oetf_inverse_BT1361, -) +from colour.models.rgb.transfer_functions import oetf_BT1361, oetf_inverse_BT1361 from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" 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 36d7ddbba..28b1d971c 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 @@ -6,10 +6,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb.transfer_functions import ( - eotf_BT1886, - eotf_inverse_BT1886, -) +from colour.models.rgb.transfer_functions import eotf_BT1886, eotf_inverse_BT1886 from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" 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 62253d167..e9f72d755 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 @@ -6,10 +6,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb.transfer_functions import ( - oetf_BT2020, - oetf_inverse_BT2020, -) +from colour.models.rgb.transfer_functions import oetf_BT2020, oetf_inverse_BT2020 from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" 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 46ca315df..d74ffece3 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 @@ -6,10 +6,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb.transfer_functions import ( - log_decoding_LLog, - log_encoding_LLog, -) +from colour.models.rgb.transfer_functions import log_decoding_LLog, log_encoding_LLog from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" 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 64e8f3434..797aa9da0 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 @@ -6,10 +6,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb.transfer_functions import ( - log_decoding_NLog, - log_encoding_NLog, -) +from colour.models.rgb.transfer_functions import log_decoding_NLog, log_encoding_NLog from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" 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 7e0e39617..73d8a88e1 100644 --- a/colour/models/rgb/transfer_functions/tests/test_panasonic_vlog.py +++ b/colour/models/rgb/transfer_functions/tests/test_panasonic_vlog.py @@ -6,10 +6,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb.transfer_functions import ( - log_decoding_VLog, - log_encoding_VLog, -) +from colour.models.rgb.transfer_functions import log_decoding_VLog, log_encoding_VLog from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" 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 4c052cb65..2af02a7f8 100644 --- a/colour/models/rgb/transfer_functions/tests/test_st_2084.py +++ b/colour/models/rgb/transfer_functions/tests/test_st_2084.py @@ -6,10 +6,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models.rgb.transfer_functions import ( - eotf_inverse_ST2084, - eotf_ST2084, -) +from colour.models.rgb.transfer_functions import eotf_inverse_ST2084, eotf_ST2084 from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" diff --git a/colour/models/tests/test_din99.py b/colour/models/tests/test_din99.py index e870852e9..27af969da 100644 --- a/colour/models/tests/test_din99.py +++ b/colour/models/tests/test_din99.py @@ -7,12 +7,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models import ( - DIN99_to_Lab, - DIN99_to_XYZ, - Lab_to_DIN99, - XYZ_to_DIN99, -) +from colour.models import DIN99_to_Lab, DIN99_to_XYZ, Lab_to_DIN99, XYZ_to_DIN99 from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" diff --git a/colour/models/tests/test_jzazbz.py b/colour/models/tests/test_jzazbz.py index 9b2a2cc46..2493799a3 100644 --- a/colour/models/tests/test_jzazbz.py +++ b/colour/models/tests/test_jzazbz.py @@ -7,12 +7,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models import ( - Izazbz_to_XYZ, - Jzazbz_to_XYZ, - XYZ_to_Izazbz, - XYZ_to_Jzazbz, -) +from colour.models import Izazbz_to_XYZ, Jzazbz_to_XYZ, XYZ_to_Izazbz, XYZ_to_Jzazbz from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" diff --git a/colour/models/tests/test_yrg.py b/colour/models/tests/test_yrg.py index 3df1f5f53..bbab9c837 100644 --- a/colour/models/tests/test_yrg.py +++ b/colour/models/tests/test_yrg.py @@ -7,12 +7,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.models import ( - LMS_to_Yrg, - XYZ_to_Yrg, - Yrg_to_LMS, - Yrg_to_XYZ, -) +from colour.models import LMS_to_Yrg, XYZ_to_Yrg, Yrg_to_LMS, Yrg_to_XYZ from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" diff --git a/colour/models/yrg.py b/colour/models/yrg.py index c77e3ba0b..f022fda18 100644 --- a/colour/models/yrg.py +++ b/colour/models/yrg.py @@ -27,12 +27,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.utilities import ( - from_range_1, - to_domain_1, - tsplit, - tstack, -) +from colour.utilities import from_range_1, to_domain_1, tsplit, tstack __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/notation/munsell.py b/colour/notation/munsell.py index eb0341fd8..7c613f601 100644 --- a/colour/notation/munsell.py +++ b/colour/notation/munsell.py @@ -146,16 +146,9 @@ Tuple, ) -from colour.hints import ( - ArrayLike, - cast, -) +from colour.hints import ArrayLike, cast from colour.models import Lab_to_LCHab # pyright: ignore -from colour.models import ( - XYZ_to_Lab, - XYZ_to_xy, - xyY_to_XYZ, -) +from colour.models import XYZ_to_Lab, XYZ_to_xy, xyY_to_XYZ from colour.notation import MUNSELL_COLOURS_ALL from colour.utilities import ( CACHE_REGISTRY, diff --git a/colour/notation/tests/test_hexadecimal.py b/colour/notation/tests/test_hexadecimal.py index ca97f3867..a61ea7be8 100644 --- a/colour/notation/tests/test_hexadecimal.py +++ b/colour/notation/tests/test_hexadecimal.py @@ -7,10 +7,7 @@ import numpy as np from colour.constants import TOLERANCE_ABSOLUTE_TESTS -from colour.notation.hexadecimal import ( - HEX_to_RGB, - RGB_to_HEX, -) +from colour.notation.hexadecimal import HEX_to_RGB, RGB_to_HEX from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers" diff --git a/colour/plotting/colorimetry.py b/colour/plotting/colorimetry.py index 07826c5f4..774e39c5c 100644 --- a/colour/plotting/colorimetry.py +++ b/colour/plotting/colorimetry.py @@ -41,12 +41,7 @@ from matplotlib.figure import Figure from matplotlib.axes import Axes -from colour.algebra import ( - LinearInterpolator, - normalise_maximum, - sdiv, - sdiv_mode, -) +from colour.algebra import LinearInterpolator, normalise_maximum, sdiv, sdiv_mode from colour.colorimetry import ( CCS_ILLUMINANTS, LIGHTNESS_METHODS, @@ -71,10 +66,7 @@ Tuple, ) -from colour.hints import ( - List, - cast, -) +from colour.hints import List, cast from colour.plotting import ( CONSTANTS_COLOUR_STYLE, XYZ_to_plotting_colourspace, diff --git a/colour/plotting/common.py b/colour/plotting/common.py index ebe523632..ec822f65f 100644 --- a/colour/plotting/common.py +++ b/colour/plotting/common.py @@ -79,12 +79,7 @@ Tuple, ) -from colour.hints import ( - ArrayLike, - List, - TypedDict, - cast, -) +from colour.hints import ArrayLike, List, TypedDict, cast from colour.models import RGB_COLOURSPACES, RGB_Colourspace, XYZ_to_RGB from colour.utilities import ( CanonicalMapping, diff --git a/colour/plotting/diagrams.py b/colour/plotting/diagrams.py index ec8cb87d0..8f83058e8 100644 --- a/colour/plotting/diagrams.py +++ b/colour/plotting/diagrams.py @@ -55,10 +55,7 @@ Sequence, ) -from colour.hints import ( - Tuple, - cast, -) +from colour.hints import Tuple, cast from colour.models import ( Luv_to_uv, Luv_uv_to_xy, diff --git a/colour/plotting/graph.py b/colour/plotting/graph.py index 3e0a5d728..ef1de35aa 100644 --- a/colour/plotting/graph.py +++ b/colour/plotting/graph.py @@ -13,10 +13,7 @@ import typing import colour -from colour.graph import ( - CONVERSION_GRAPH_NODE_LABELS, - describe_conversion_path, -) +from colour.graph import CONVERSION_GRAPH_NODE_LABELS, describe_conversion_path if typing.TYPE_CHECKING: from colour.hints import Literal diff --git a/colour/plotting/models.py b/colour/plotting/models.py index 732535f12..b6c8b9a49 100644 --- a/colour/plotting/models.py +++ b/colour/plotting/models.py @@ -79,10 +79,7 @@ Tuple, ) -from colour.hints import ( - List, - cast, -) +from colour.hints import List, cast from colour.models import LCHab_to_Lab # pyright: ignore from colour.models import ( CCS_ILLUMINANT_POINTER_GAMUT, diff --git a/colour/plotting/notation.py b/colour/plotting/notation.py index fb0ad8230..417e8a3b9 100644 --- a/colour/plotting/notation.py +++ b/colour/plotting/notation.py @@ -22,11 +22,7 @@ from colour.hints import Any, Callable, Dict, Sequence, Tuple from colour.notation import MUNSELL_VALUE_METHODS -from colour.plotting import ( - filter_passthrough, - override_style, - plot_multi_functions, -) +from colour.plotting import filter_passthrough, override_style, plot_multi_functions __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/plotting/phenomena.py b/colour/plotting/phenomena.py index b71da1501..f419b69fa 100644 --- a/colour/plotting/phenomena.py +++ b/colour/plotting/phenomena.py @@ -19,10 +19,7 @@ from matplotlib.axes import Axes from colour.algebra import normalise_maximum -from colour.colorimetry import ( - MultiSpectralDistributions, - sd_to_XYZ, -) +from colour.colorimetry import MultiSpectralDistributions, sd_to_XYZ if typing.TYPE_CHECKING: from colour.hints import Any, ArrayLike, Dict, Sequence, Tuple diff --git a/colour/plotting/quality.py b/colour/plotting/quality.py index 3ad36d749..d03c65113 100644 --- a/colour/plotting/quality.py +++ b/colour/plotting/quality.py @@ -41,10 +41,7 @@ Tuple, ) -from colour.hints import ( - List, - cast, -) +from colour.hints import List, cast from colour.plotting import ( CONSTANTS_COLOUR_STYLE, XYZ_to_plotting_colourspace, diff --git a/colour/plotting/section.py b/colour/plotting/section.py index ffb182109..894c404df 100644 --- a/colour/plotting/section.py +++ b/colour/plotting/section.py @@ -47,10 +47,7 @@ Tuple, ) -from colour.hints import ( - Real, - cast, -) +from colour.hints import Real, cast from colour.models import ( COLOURSPACE_MODELS_AXIS_LABELS, COLOURSPACE_MODELS_DOMAIN_RANGE_SCALE_1_TO_REFERENCE, diff --git a/colour/plotting/temperature.py b/colour/plotting/temperature.py index b2022c3cd..17e151cdf 100644 --- a/colour/plotting/temperature.py +++ b/colour/plotting/temperature.py @@ -47,13 +47,8 @@ Tuple, ) -from colour.hints import ( - cast, -) -from colour.models import ( - UCS_uv_to_xy, - xy_to_XYZ, -) +from colour.hints import cast +from colour.models import UCS_uv_to_xy, xy_to_XYZ from colour.plotting import ( CONSTANTS_ARROW_STYLE, CONSTANTS_COLOUR_STYLE, diff --git a/colour/plotting/tests/test_characterisation.py b/colour/plotting/tests/test_characterisation.py index 5186bd32a..ce60b398c 100644 --- a/colour/plotting/tests/test_characterisation.py +++ b/colour/plotting/tests/test_characterisation.py @@ -5,10 +5,7 @@ from matplotlib.axes import Axes from matplotlib.figure import Figure -from colour.plotting import ( - plot_multi_colour_checkers, - plot_single_colour_checker, -) +from colour.plotting import plot_multi_colour_checkers, plot_single_colour_checker __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/plotting/tests/test_diagrams.py b/colour/plotting/tests/test_diagrams.py index 8dd77b54e..99b36f1e7 100644 --- a/colour/plotting/tests/test_diagrams.py +++ b/colour/plotting/tests/test_diagrams.py @@ -6,12 +6,7 @@ from matplotlib.axes import Axes from matplotlib.figure import Figure -from colour.colorimetry import ( - MSDS_CMFS, - SDS_ILLUMINANTS, - SpectralShape, - reshape_msds, -) +from colour.colorimetry import MSDS_CMFS, SDS_ILLUMINANTS, SpectralShape, reshape_msds from colour.plotting import ( lines_spectral_locus, plot_chromaticity_diagram_CIE1931, diff --git a/colour/plotting/tests/test_phenomena.py b/colour/plotting/tests/test_phenomena.py index d94268850..143eb4986 100644 --- a/colour/plotting/tests/test_phenomena.py +++ b/colour/plotting/tests/test_phenomena.py @@ -5,10 +5,7 @@ from matplotlib.axes import Axes from matplotlib.figure import Figure -from colour.plotting import ( - plot_single_sd_rayleigh_scattering, - plot_the_blue_sky, -) +from colour.plotting import plot_single_sd_rayleigh_scattering, plot_the_blue_sky __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/plotting/tests/test_section.py b/colour/plotting/tests/test_section.py index 8653bcae7..eb15b13e3 100644 --- a/colour/plotting/tests/test_section.py +++ b/colour/plotting/tests/test_section.py @@ -7,14 +7,8 @@ from colour.geometry import primitive_cube from colour.models import RGB_COLOURSPACE_sRGB, RGB_to_XYZ -from colour.plotting import ( - plot_RGB_colourspace_section, - plot_visible_spectrum_section, -) -from colour.plotting.section import ( - plot_hull_section_colours, - plot_hull_section_contour, -) +from colour.plotting import plot_RGB_colourspace_section, plot_visible_spectrum_section +from colour.plotting.section import plot_hull_section_colours, plot_hull_section_contour from colour.utilities import is_trimesh_installed __author__ = "Colour Developers" diff --git a/colour/plotting/volume.py b/colour/plotting/volume.py index 67e30c39e..e0a9fb006 100644 --- a/colour/plotting/volume.py +++ b/colour/plotting/volume.py @@ -20,10 +20,7 @@ from colour.colorimetry import MultiSpectralDistributions from colour.constants import EPSILON -from colour.geometry import ( - primitive_vertices_cube_mpl, - primitive_vertices_grid_mpl, -) +from colour.geometry import primitive_vertices_cube_mpl, primitive_vertices_grid_mpl from colour.graph import convert if typing.TYPE_CHECKING: @@ -36,12 +33,7 @@ NDArrayFloat, ) -from colour.hints import ( - List, - Sequence, - Tuple, - cast, -) +from colour.hints import List, Sequence, Tuple, cast from colour.models import RGB_Colourspace, RGB_to_XYZ from colour.models.common import COLOURSPACE_MODELS_AXIS_LABELS from colour.plotting import ( diff --git a/colour/quality/cqs.py b/colour/quality/cqs.py index 597c73062..1625c7faa 100644 --- a/colour/quality/cqs.py +++ b/colour/quality/cqs.py @@ -52,29 +52,13 @@ Tuple, ) -from colour.hints import ( - cast, -) +from colour.hints import cast from colour.models import Lab_to_LCHab # pyright: ignore -from colour.models import ( - UCS_to_uv, - XYZ_to_Lab, - XYZ_to_UCS, - XYZ_to_xy, - xy_to_XYZ, -) +from colour.models import UCS_to_uv, XYZ_to_Lab, XYZ_to_UCS, XYZ_to_xy, xy_to_XYZ from colour.quality.datasets.vs import INDEXES_TO_NAMES_VS, SDS_VS from colour.temperature import CCT_to_xy_CIE_D, uv_to_CCT_Ohno2013 -from colour.utilities import ( - as_float_array, - domain_range_scale, - tsplit, - validate_method, -) -from colour.utilities.documentation import ( - DocstringTuple, - is_documentation_building, -) +from colour.utilities import as_float_array, domain_range_scale, tsplit, validate_method +from colour.utilities.documentation import DocstringTuple, is_documentation_building __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" diff --git a/colour/quality/tests/test_cqs.py b/colour/quality/tests/test_cqs.py index fede00973..1cc4a21fb 100644 --- a/colour/quality/tests/test_cqs.py +++ b/colour/quality/tests/test_cqs.py @@ -7,10 +7,7 @@ from colour.colorimetry import SDS_ILLUMINANTS, SDS_LIGHT_SOURCES from colour.constants import TOLERANCE_ABSOLUTE_TESTS from colour.hints import cast -from colour.quality import ( - ColourRendering_Specification_CQS, - colour_quality_scale, -) +from colour.quality import ColourRendering_Specification_CQS, colour_quality_scale from colour.quality.cqs import DataColorimetry_VS, DataColourQualityScale_VS __author__ = "Colour Developers" diff --git a/colour/quality/tests/test_cri.py b/colour/quality/tests/test_cri.py index 9349ee4ce..d671a0232 100644 --- a/colour/quality/tests/test_cri.py +++ b/colour/quality/tests/test_cri.py @@ -7,10 +7,7 @@ from colour.colorimetry import SDS_ILLUMINANTS, SpectralDistribution from colour.constants import TOLERANCE_ABSOLUTE_TESTS from colour.hints import cast -from colour.quality import ( - ColourRendering_Specification_CRI, - colour_rendering_index, -) +from colour.quality import ColourRendering_Specification_CRI, colour_rendering_index from colour.quality.cri import DataColorimetry_TCS, DataColourQualityScale_TCS __author__ = "Colour Developers" diff --git a/colour/recovery/jiang2013.py b/colour/recovery/jiang2013.py index cd45113ce..f281013ab 100644 --- a/colour/recovery/jiang2013.py +++ b/colour/recovery/jiang2013.py @@ -41,9 +41,7 @@ Tuple, ) -from colour.hints import ( - cast, -) +from colour.hints import cast from colour.recovery import BASIS_FUNCTIONS_DYER2017 from colour.utilities import as_float_array, optional, runtime_warning, tsplit diff --git a/colour/recovery/smits1999.py b/colour/recovery/smits1999.py index d0ec14213..691ab73d8 100644 --- a/colour/recovery/smits1999.py +++ b/colour/recovery/smits1999.py @@ -20,11 +20,7 @@ if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat -from colour.models import ( - RGB_Colourspace, - RGB_COLOURSPACE_sRGB, - XYZ_to_RGB, -) +from colour.models import RGB_Colourspace, RGB_COLOURSPACE_sRGB, XYZ_to_RGB from colour.recovery import SDS_SMITS1999 from colour.utilities import to_domain_1 diff --git a/colour/recovery/tests/test_jakob2019.py b/colour/recovery/tests/test_jakob2019.py index cd3c0c0ce..e2e63a5c5 100644 --- a/colour/recovery/tests/test_jakob2019.py +++ b/colour/recovery/tests/test_jakob2019.py @@ -18,12 +18,7 @@ if typing.TYPE_CHECKING: from colour.hints import Type -from colour.models import ( - RGB_COLOURSPACE_sRGB, - RGB_to_XYZ, - XYZ_to_Lab, - XYZ_to_xy, -) +from colour.models import RGB_COLOURSPACE_sRGB, RGB_to_XYZ, XYZ_to_Lab, XYZ_to_xy from colour.recovery.jakob2019 import ( SPECTRAL_SHAPE_JAKOB2019, LUT3D_Jakob2019, diff --git a/colour/recovery/tests/test_jiang2013.py b/colour/recovery/tests/test_jiang2013.py index d08759c5a..301f36462 100644 --- a/colour/recovery/tests/test_jiang2013.py +++ b/colour/recovery/tests/test_jiang2013.py @@ -7,10 +7,7 @@ import numpy as np import pytest -from colour.characterisation import ( - MSDS_CAMERA_SENSITIVITIES, - SDS_COLOURCHECKERS, -) +from colour.characterisation import MSDS_CAMERA_SENSITIVITIES, SDS_COLOURCHECKERS from colour.colorimetry import ( SDS_ILLUMINANTS, SpectralDistribution, diff --git a/colour/temperature/ohno2013.py b/colour/temperature/ohno2013.py index 0a43ef5fb..a3f1ef52f 100644 --- a/colour/temperature/ohno2013.py +++ b/colour/temperature/ohno2013.py @@ -26,10 +26,7 @@ import numpy as np from colour.algebra import euclidean_distance, sdiv, sdiv_mode -from colour.colorimetry import ( - MultiSpectralDistributions, - handle_spectral_arguments, -) +from colour.colorimetry import MultiSpectralDistributions, handle_spectral_arguments if typing.TYPE_CHECKING: from colour.hints import ArrayLike, NDArrayFloat diff --git a/colour/temperature/tests/test_ohno2013.py b/colour/temperature/tests/test_ohno2013.py index 3315f7091..944020362 100644 --- a/colour/temperature/tests/test_ohno2013.py +++ b/colour/temperature/tests/test_ohno2013.py @@ -14,9 +14,7 @@ XYZ_to_CCT_Ohno2013, uv_to_CCT_Ohno2013, ) -from colour.temperature.ohno2013 import ( - planckian_table, -) +from colour.temperature.ohno2013 import planckian_table from colour.utilities import ignore_numpy_errors __author__ = "Colour Developers" diff --git a/colour/utilities/callback.py b/colour/utilities/callback.py index 8a3df821d..cfe8711a3 100644 --- a/colour/utilities/callback.py +++ b/colour/utilities/callback.py @@ -11,7 +11,7 @@ from collections import defaultdict from dataclasses import dataclass -if typing.TYPE_CHECKING: # pragma: no cover +if typing.TYPE_CHECKING: from colour.hints import Any, Callable, List __author__ = "Colour Developers" diff --git a/colour/utilities/tests/test_array.py b/colour/utilities/tests/test_array.py index 9d770ac88..8a2845563 100644 --- a/colour/utilities/tests/test_array.py +++ b/colour/utilities/tests/test_array.py @@ -206,7 +206,7 @@ def test__iter__(self) -> None: method. """ - assert {key: value for key, value in self._data} == ( # noqa: C416 + assert {key: value for key, value in self._data} == ( {"a": "Foo", "b": "Bar", "c": "Baz"} ) @@ -669,10 +669,7 @@ def test_set_default_float_dtype_enforcement(self) -> None: CAM_Specification_Kim2009, CAM_Specification_ZCAM, ) - from colour.graph.conversion import ( - CONVERSION_SPECIFICATIONS_DATA, - convert, - ) + from colour.graph.conversion import CONVERSION_SPECIFICATIONS_DATA, convert try: dtype = np.float32 diff --git a/colour/utilities/tests/test_deprecated.py b/colour/utilities/tests/test_deprecated.py index 32eebee9e..78b757611 100644 --- a/colour/utilities/tests/test_deprecated.py +++ b/colour/utilities/tests/test_deprecated.py @@ -9,11 +9,7 @@ if typing.TYPE_CHECKING: from colour.hints import Any -from colour.utilities.deprecation import ( - ModuleAPI, - ObjectRemoved, - ObjectRenamed, -) +from colour.utilities.deprecation import ModuleAPI, ObjectRemoved, ObjectRenamed class deprecated(ModuleAPI): diff --git a/colour/volume/macadam_limits.py b/colour/volume/macadam_limits.py index e4158f3bd..08b1023d6 100644 --- a/colour/volume/macadam_limits.py +++ b/colour/volume/macadam_limits.py @@ -18,11 +18,7 @@ from colour.hints import ArrayLike, Literal, NDArrayFloat from colour.models import xyY_to_XYZ -from colour.utilities import ( - CACHE_REGISTRY, - is_caching_enabled, - validate_method, -) +from colour.utilities import CACHE_REGISTRY, is_caching_enabled, validate_method from colour.volume import OPTIMAL_COLOUR_STIMULI_ILLUMINANTS __author__ = "Colour Developers" diff --git a/colour/volume/spectrum.py b/colour/volume/spectrum.py index 7b3a3c76d..c510e60bd 100644 --- a/colour/volume/spectrum.py +++ b/colour/volume/spectrum.py @@ -43,12 +43,7 @@ NDArrayFloat, ) -from colour.utilities import ( - CACHE_REGISTRY, - is_caching_enabled, - validate_method, - zeros, -) +from colour.utilities import CACHE_REGISTRY, is_caching_enabled, validate_method, zeros from colour.volume import is_within_mesh_volume __author__ = "Colour Developers" diff --git a/pyproject.toml b/pyproject.toml index 01134fcc7..c262fe9c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,68 +148,17 @@ filterwarnings = [ [tool.ruff] target-version = "py310" line-length = 88 -select = [ - "A", # flake8-builtins - "ARG", # flake8-unused-arguments - "ANN", # flake8-annotations - "ASYNC", # flake8-async - "B", # flake8-bugbear - # "C", # Pylint - Convention - "BLE", # flake8-blind-except - "C4", # flake8-comprehensions - # "C90", # mccabe - # "COM", # flake8-commas - "CPY", # flake8-copyright - "DTZ", # flake8-datetimez - "D", # pydocstyle - "DOC", # pydoclint - "E", # Pylint - Error - # "ERA", # eradicate - "EM", # flake8-errmsg - "EXE", # flake8-executable - "F", # flake8 - # "FIX", # flake8-fixme - "FA", # flake8-future-annotations - # "FBT", # flake8-boolean-trap - "FLY", # flynt - "FURB", # Refurb - "G", # flake8-logging-format - "I", # isort - "ICN", # flake8-import-conventions - "INP", # flake8-no-pep420 - "INT", # flake8-gettext - "ISC", # flake8-implicit-str-concat - "LOG", # flake8-logging - "N", # pep8-naming - "NPY", # Numpy - "PD", # pandas-vet - "PERF", # Perflint - "PIE", # flake8-pie - "PGH", # pygrep-hooks - "PL", # pylint - # "PT", # flake8-pytest-style - # "PTH", # flake8-use-pathlib [Enable] - "PYI", # flake8-pyi - "Q", # flake8-quotes - "R", # pylint-refactor - "RET", # flake8-return - "RSE", # flake8-raise - "RUF", # Ruff - "S", # flake8-bandit - "SLF", # flake8-self - "SLOT", # flake8-slots - "SIM", # flake8-simplify - "T10", # flake8-debugger - "T20", # flake8-print - "TC", # flake8-type-checking - # "TD", # flake8-todos - "TID", # flake8-tidy-imports - "TRY", # tryceratops - "UP", # pyupgrade - "W", # Pylint - Warning - "YTT", # flake8-2020 -] +select = ["ALL"] ignore = [ + "C", # Pylint - Convention + "C90", # mccabe + "COM", # flake8-commas + "ERA", # eradicate + "FBT", # flake8-boolean-trap + "FIX", # flake8-fixme + "PT", # flake8-pytest-style + "PTH", # flake8-use-pathlib [Enable] + "TD", # flake8-todos "ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `**kwargs` "D200", # One-line docstring should fit on one line "D202", # No blank lines allowed after function docstring diff --git a/utilities/generate_plots.py b/utilities/generate_plots.py index feda11eba..df0c2f4fb 100755 --- a/utilities/generate_plots.py +++ b/utilities/generate_plots.py @@ -115,20 +115,15 @@ plot_RGB_colourspaces_in_chromaticity_diagram, ) from colour.plotting.quality import plot_colour_quality_bars -from colour.plotting.section import ( - plot_hull_section_colours, - plot_hull_section_contour, -) +from colour.plotting.section import plot_hull_section_colours, plot_hull_section_contour from colour.plotting.temperature import ( plot_daylight_locus, plot_planckian_locus, plot_planckian_locus_in_chromaticity_diagram, ) from colour.quality import colour_quality_scale -from colour.utilities import ( # ; noqa: RUF100 - domain_range_scale, - filter_warnings, -) +from colour.utilities import domain_range_scale # ; noqa: RUF100 +from colour.utilities import filter_warnings __copyright__ = "Copyright 2013 Colour Developers" __license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"