diff --git a/colour/__init__.py b/colour/__init__.py index d2ac4d58e..fe7258a02 100644 --- a/colour/__init__.py +++ b/colour/__init__.py @@ -44,6 +44,8 @@ - volume: Colourspace volumes computation and optimal colour stimuli. """ +# isort: skip_file + import contextlib import json import os diff --git a/colour/adaptation/__init__.py b/colour/adaptation/__init__.py index 05a13de33..2947d9ce0 100644 --- a/colour/adaptation/__init__.py +++ b/colour/adaptation/__init__.py @@ -27,6 +27,8 @@ Express, 26(6), 7724. doi:10.1364/OE.26.007724 """ +# isort: skip_file + from __future__ import annotations from colour.hints import Any, ArrayLike, Literal, NDArrayFloat diff --git a/colour/adaptation/datasets/__init__.py b/colour/adaptation/datasets/__init__.py index 762d95ce4..649004b0b 100644 --- a/colour/adaptation/datasets/__init__.py +++ b/colour/adaptation/datasets/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .cat import CHROMATIC_ADAPTATION_TRANSFORMS from .cat import ( CAT_XYZ_SCALING, diff --git a/colour/algebra/__init__.py b/colour/algebra/__init__.py index 2e7daba63..e5c0d248a 100644 --- a/colour/algebra/__init__.py +++ b/colour/algebra/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + import sys from colour.utilities.deprecation import ModuleAPI, build_API_changes diff --git a/colour/algebra/coordinates/__init__.py b/colour/algebra/coordinates/__init__.py index e74ed73d4..5f4d7a40e 100644 --- a/colour/algebra/coordinates/__init__.py +++ b/colour/algebra/coordinates/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .transformations import ( cartesian_to_spherical, spherical_to_cartesian, diff --git a/colour/appearance/__init__.py b/colour/appearance/__init__.py index 775792b0e..acedf72de 100644 --- a/colour/appearance/__init__.py +++ b/colour/appearance/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .hunt import ( InductionFactors_Hunt, VIEWING_CONDITIONS_HUNT, diff --git a/colour/biochemistry/__init__.py b/colour/biochemistry/__init__.py index af5d4d1cc..8d46a6835 100644 --- a/colour/biochemistry/__init__.py +++ b/colour/biochemistry/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .michaelis_menten import ( REACTION_RATE_MICHAELISMENTEN_METHODS, reaction_rate_MichaelisMenten, diff --git a/colour/blindness/__init__.py b/colour/blindness/__init__.py index e32f436ec..7e6dd99a1 100644 --- a/colour/blindness/__init__.py +++ b/colour/blindness/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .datasets import * # noqa: F403 from . import datasets from .machado2009 import ( diff --git a/colour/characterisation/__init__.py b/colour/characterisation/__init__.py index ef485dacc..1f5a77fc3 100644 --- a/colour/characterisation/__init__.py +++ b/colour/characterisation/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .cameras import RGB_CameraSensitivities from .displays import RGB_DisplayPrimaries from .datasets import * # noqa: F403 diff --git a/colour/characterisation/datasets/__init__.py b/colour/characterisation/datasets/__init__.py index d93d169a0..9d819472c 100644 --- a/colour/characterisation/datasets/__init__.py +++ b/colour/characterisation/datasets/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .aces_it import MSDS_ACES_RICD from .cameras import MSDS_CAMERA_SENSITIVITIES from .colour_checkers import ( diff --git a/colour/characterisation/datasets/cameras/__init__.py b/colour/characterisation/datasets/cameras/__init__.py index 2b6ad61df..e67139eeb 100644 --- a/colour/characterisation/datasets/cameras/__init__.py +++ b/colour/characterisation/datasets/cameras/__init__.py @@ -9,9 +9,10 @@ from __future__ import annotations -from .dslr import MSDS_CAMERA_SENSITIVITIES_DSLR from colour.utilities import LazyCanonicalMapping +from .dslr import MSDS_CAMERA_SENSITIVITIES_DSLR + MSDS_CAMERA_SENSITIVITIES: LazyCanonicalMapping = LazyCanonicalMapping( MSDS_CAMERA_SENSITIVITIES_DSLR ) diff --git a/colour/characterisation/datasets/displays/__init__.py b/colour/characterisation/datasets/displays/__init__.py index ea1a0420c..0749dc22c 100644 --- a/colour/characterisation/datasets/displays/__init__.py +++ b/colour/characterisation/datasets/displays/__init__.py @@ -11,9 +11,10 @@ http://www.lume.ufrgs.br/handle/10183/26950 """ +from colour.utilities import LazyCanonicalMapping + from .crt import MSDS_DISPLAY_PRIMARIES_CRT from .lcd import MSDS_DISPLAY_PRIMARIES_LCD -from colour.utilities import LazyCanonicalMapping MSDS_DISPLAY_PRIMARIES = LazyCanonicalMapping(MSDS_DISPLAY_PRIMARIES_CRT) MSDS_DISPLAY_PRIMARIES.update(MSDS_DISPLAY_PRIMARIES_LCD) diff --git a/colour/colorimetry/__init__.py b/colour/colorimetry/__init__.py index ae7fedf03..6355f7632 100644 --- a/colour/colorimetry/__init__.py +++ b/colour/colorimetry/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .spectrum import ( SpectralShape, SPECTRAL_SHAPE_DEFAULT, diff --git a/colour/colorimetry/datasets/__init__.py b/colour/colorimetry/datasets/__init__.py index c41e1ab1a..b8d3e36d8 100644 --- a/colour/colorimetry/datasets/__init__.py +++ b/colour/colorimetry/datasets/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .cmfs import ( MSDS_CMFS, MSDS_CMFS_LMS, diff --git a/colour/colorimetry/datasets/illuminants/__init__.py b/colour/colorimetry/datasets/illuminants/__init__.py index 3580d98bc..fbae3f060 100644 --- a/colour/colorimetry/datasets/illuminants/__init__.py +++ b/colour/colorimetry/datasets/illuminants/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .chromaticity_coordinates import CCS_ILLUMINANTS from .sds_d_illuminant_series import ( SDS_BASIS_FUNCTIONS_CIE_ILLUMINANT_D_SERIES, diff --git a/colour/constants/__init__.py b/colour/constants/__init__.py index 56dbcd220..13d3311ba 100644 --- a/colour/constants/__init__.py +++ b/colour/constants/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .cie import CONSTANT_K_M, CONSTANT_KP_M from .codata import ( CONSTANT_AVOGADRO, diff --git a/colour/continuous/__init__.py b/colour/continuous/__init__.py index 68516be70..e75d7ebed 100644 --- a/colour/continuous/__init__.py +++ b/colour/continuous/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .abstract import AbstractContinuousFunction from .signal import Signal from .multi_signals import MultiSignals diff --git a/colour/contrast/__init__.py b/colour/contrast/__init__.py index 281be0664..109d88684 100644 --- a/colour/contrast/__init__.py +++ b/colour/contrast/__init__.py @@ -16,6 +16,8 @@ https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2246-4-2015-PDF-E.pdf """ +# isort: skip_file + from __future__ import annotations from colour.hints import NDArrayFloat, Literal diff --git a/colour/corresponding/__init__.py b/colour/corresponding/__init__.py index 9d1391586..e2b9e1d59 100644 --- a/colour/corresponding/__init__.py +++ b/colour/corresponding/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .datasets import * # noqa: F403 from . import datasets from .prediction import ( diff --git a/colour/corresponding/datasets/__init__.py b/colour/corresponding/datasets/__init__.py index 2acba7565..53f5f7061 100644 --- a/colour/corresponding/datasets/__init__.py +++ b/colour/corresponding/datasets/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .breneman1987 import ( BRENEMAN_EXPERIMENTS, BRENEMAN_EXPERIMENT_PRIMARIES_CHROMATICITIES, diff --git a/colour/difference/__init__.py b/colour/difference/__init__.py index 013362b2d..4f51f4a1c 100644 --- a/colour/difference/__init__.py +++ b/colour/difference/__init__.py @@ -35,6 +35,8 @@ August 29, 2014, from http://en.wikipedia.org/wiki/Color_difference """ +# isort: skip_file + from __future__ import annotations from colour.hints import Any, ArrayLike, NDArrayFloat, LiteralDeltaEMethod diff --git a/colour/geometry/__init__.py b/colour/geometry/__init__.py index 9b55aa233..d004613c6 100644 --- a/colour/geometry/__init__.py +++ b/colour/geometry/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .ellipse import ( ellipse_coefficients_general_form, ellipse_coefficients_canonical_form, diff --git a/colour/graph/__init__.py b/colour/graph/__init__.py index 4f8b37021..91bf3714b 100644 --- a/colour/graph/__init__.py +++ b/colour/graph/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .conversion import ( CONVERSION_GRAPH, CONVERSION_GRAPH_NODE_LABELS, diff --git a/colour/hints/__init__.py b/colour/hints/__init__.py index f77419471..caa7830b4 100644 --- a/colour/hints/__init__.py +++ b/colour/hints/__init__.py @@ -9,11 +9,11 @@ from __future__ import annotations -import numpy as np import re -from numpy.typing import ArrayLike, NDArray +from collections.abc import Generator, Iterable, Iterator, Mapping, Sequence from types import ModuleType from typing import ( # noqa: UP035 + TYPE_CHECKING, Any, Callable, ClassVar, @@ -24,17 +24,18 @@ Protocol, Set, SupportsIndex, - TYPE_CHECKING, TextIO, Tuple, Type, - TypeVar, TypedDict, + TypeVar, cast, overload, runtime_checkable, ) -from collections.abc import Generator, Iterable, Iterator, Mapping, Sequence + +import numpy as np +from numpy.typing import ArrayLike, NDArray from typing_extensions import Self __author__ = "Colour Developers" diff --git a/colour/io/__init__.py b/colour/io/__init__.py index ce26ff650..326ffa208 100644 --- a/colour/io/__init__.py +++ b/colour/io/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + import sys from colour.utilities.deprecation import ModuleAPI, build_API_changes diff --git a/colour/io/luts/__init__.py b/colour/io/luts/__init__.py index 5b09e748a..0047dc906 100644 --- a/colour/io/luts/__init__.py +++ b/colour/io/luts/__init__.py @@ -11,6 +11,8 @@ https://sourceforge.net/projects/cinespacelutlib/ """ +# isort: skip_file + from __future__ import annotations import os diff --git a/colour/models/__init__.py b/colour/models/__init__.py index 7a668a350..f16e3c69c 100644 --- a/colour/models/__init__.py +++ b/colour/models/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + import sys from colour.utilities import copy_definition diff --git a/colour/models/datasets/__init__.py b/colour/models/datasets/__init__.py index 31bdd4e02..c8e08fb3d 100644 --- a/colour/models/datasets/__init__.py +++ b/colour/models/datasets/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .macadam_ellipses import DATA_MACADAM_1942_ELLIPSES from .pointer_gamut import ( CCS_ILLUMINANT_POINTER_GAMUT, diff --git a/colour/models/rgb/__init__.py b/colour/models/rgb/__init__.py index ceb2eb42c..1ae8b910a 100644 --- a/colour/models/rgb/__init__.py +++ b/colour/models/rgb/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .derivation import ( normalised_primary_matrix, chromatically_adapted_primaries, diff --git a/colour/models/rgb/datasets/__init__.py b/colour/models/rgb/datasets/__init__.py index aadf16263..72f44e75d 100644 --- a/colour/models/rgb/datasets/__init__.py +++ b/colour/models/rgb/datasets/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from __future__ import annotations from colour.utilities import LazyCanonicalMapping diff --git a/colour/models/rgb/transfer_functions/__init__.py b/colour/models/rgb/transfer_functions/__init__.py index 6ff2397fc..6f4b17bae 100644 --- a/colour/models/rgb/transfer_functions/__init__.py +++ b/colour/models/rgb/transfer_functions/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from __future__ import annotations from functools import partial diff --git a/colour/notation/__init__.py b/colour/notation/__init__.py index 31f50c424..42c4de587 100644 --- a/colour/notation/__init__.py +++ b/colour/notation/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .datasets import ( CSS_COLOR_3_BASIC, CSS_COLOR_3_EXTENDED, diff --git a/colour/notation/datasets/__init__.py b/colour/notation/datasets/__init__.py index d604ee97b..8982a3c6c 100644 --- a/colour/notation/datasets/__init__.py +++ b/colour/notation/datasets/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .css_color_3 import CSS_COLOR_3_BASIC, CSS_COLOR_3_EXTENDED, CSS_COLOR_3 from .munsell import ( MUNSELL_COLOURS_ALL, diff --git a/colour/notation/datasets/munsell/__init__.py b/colour/notation/datasets/munsell/__init__.py index a50c3df39..e9a701864 100644 --- a/colour/notation/datasets/munsell/__init__.py +++ b/colour/notation/datasets/munsell/__init__.py @@ -1,7 +1,8 @@ +from colour.utilities import CanonicalMapping + from .all import MUNSELL_COLOURS_ALL from .experimental import MUNSELL_COLOURS_1929 from .real import MUNSELL_COLOURS_REAL -from colour.utilities import CanonicalMapping __all__ = [ "MUNSELL_COLOURS_ALL", diff --git a/colour/phenomena/__init__.py b/colour/phenomena/__init__.py index f080f2fff..e17074540 100644 --- a/colour/phenomena/__init__.py +++ b/colour/phenomena/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .rayleigh import ( scattering_cross_section, rayleigh_optical_depth, diff --git a/colour/plotting/__init__.py b/colour/plotting/__init__.py index 7f5c51449..225841caa 100644 --- a/colour/plotting/__init__.py +++ b/colour/plotting/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from colour.utilities import is_matplotlib_installed if not is_matplotlib_installed(): # pragma: no cover diff --git a/colour/plotting/datasets/__init__.py b/colour/plotting/datasets/__init__.py index 2528d404f..1e132643c 100644 --- a/colour/plotting/datasets/__init__.py +++ b/colour/plotting/datasets/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .astm_g_173 import ( SD_ASTMG173_ETR, SD_ASTMG173_GLOBAL_TILT, diff --git a/colour/plotting/tm3018/__init__.py b/colour/plotting/tm3018/__init__.py index 25062abce..61d4fadfd 100644 --- a/colour/plotting/tm3018/__init__.py +++ b/colour/plotting/tm3018/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .report import ( plot_single_sd_colour_rendition_report_full, plot_single_sd_colour_rendition_report_intermediate, diff --git a/colour/quality/__init__.py b/colour/quality/__init__.py index c28b4f11b..960c01880 100644 --- a/colour/quality/__init__.py +++ b/colour/quality/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from __future__ import annotations from colour.colorimetry import SpectralDistribution diff --git a/colour/recovery/__init__.py b/colour/recovery/__init__.py index 26c68bd9a..4d4659d36 100644 --- a/colour/recovery/__init__.py +++ b/colour/recovery/__init__.py @@ -18,8 +18,9 @@ doi:10.1080/10867651.1999.10487511 """ -from __future__ import annotations +# isort: skip_file +from __future__ import annotations from colour.colorimetry import SpectralDistribution from colour.hints import Any, ArrayLike, Literal diff --git a/colour/recovery/datasets/__init__.py b/colour/recovery/datasets/__init__.py index d46c56a2e..4d3cbe965 100644 --- a/colour/recovery/datasets/__init__.py +++ b/colour/recovery/datasets/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .dyer2017 import ( SPECTRAL_SHAPE_BASIS_FUNCTIONS_DYER2017, BASIS_FUNCTIONS_DYER2017, diff --git a/colour/temperature/__init__.py b/colour/temperature/__init__.py index c609fd2dc..c54661a0d 100644 --- a/colour/temperature/__init__.py +++ b/colour/temperature/__init__.py @@ -39,6 +39,8 @@ ISBN:978-0-471-39918-6 """ +# isort: skip_file + from __future__ import annotations from colour.hints import Any, ArrayLike, NDArrayFloat, Literal diff --git a/colour/utilities/__init__.py b/colour/utilities/__init__.py index 98c888cbd..129815065 100644 --- a/colour/utilities/__init__.py +++ b/colour/utilities/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from __future__ import annotations import sys diff --git a/colour/volume/__init__.py b/colour/volume/__init__.py index 4d04fbba1..ce1d89f06 100644 --- a/colour/volume/__init__.py +++ b/colour/volume/__init__.py @@ -1,3 +1,5 @@ +# isort: skip_file + from .datasets import * # noqa: F403 from . import datasets from .macadam_limits import is_within_macadam_limits diff --git a/pyproject.toml b/pyproject.toml index 1700ad583..a678f5306 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,7 +113,6 @@ force_grid_wrap = 0 include_trailing_comma = true line_length = 88 multi_line_output = 3 -skip_glob = ["colour/**/__init__.py"] split_on_trailing_comma = true use_parentheses = true