From bca1ff5fcca6f64d1c2d807d04127c4b125bb700 Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Thu, 12 Dec 2024 22:33:34 +1300 Subject: [PATCH] Disable `isort` glob. --- colour/__init__.py | 2 ++ colour/adaptation/__init__.py | 2 ++ colour/adaptation/datasets/__init__.py | 2 ++ colour/algebra/__init__.py | 2 ++ colour/algebra/coordinates/__init__.py | 2 ++ colour/appearance/__init__.py | 2 ++ colour/biochemistry/__init__.py | 2 ++ colour/blindness/__init__.py | 2 ++ colour/characterisation/__init__.py | 2 ++ colour/characterisation/datasets/__init__.py | 2 ++ colour/characterisation/datasets/cameras/__init__.py | 3 ++- colour/characterisation/datasets/displays/__init__.py | 3 ++- colour/colorimetry/__init__.py | 2 ++ colour/colorimetry/datasets/__init__.py | 2 ++ colour/colorimetry/datasets/illuminants/__init__.py | 2 ++ colour/constants/__init__.py | 2 ++ colour/continuous/__init__.py | 2 ++ colour/contrast/__init__.py | 2 ++ colour/corresponding/__init__.py | 2 ++ colour/corresponding/datasets/__init__.py | 2 ++ colour/difference/__init__.py | 2 ++ colour/geometry/__init__.py | 2 ++ colour/graph/__init__.py | 2 ++ colour/hints/__init__.py | 11 ++++++----- colour/io/__init__.py | 2 ++ colour/io/luts/__init__.py | 2 ++ colour/models/__init__.py | 2 ++ colour/models/datasets/__init__.py | 2 ++ colour/models/rgb/__init__.py | 2 ++ colour/models/rgb/datasets/__init__.py | 2 ++ colour/models/rgb/transfer_functions/__init__.py | 2 ++ colour/notation/__init__.py | 2 ++ colour/notation/datasets/__init__.py | 2 ++ colour/notation/datasets/munsell/__init__.py | 3 ++- colour/phenomena/__init__.py | 2 ++ colour/plotting/__init__.py | 2 ++ colour/plotting/datasets/__init__.py | 2 ++ colour/plotting/tm3018/__init__.py | 2 ++ colour/quality/__init__.py | 2 ++ colour/recovery/__init__.py | 3 ++- colour/recovery/datasets/__init__.py | 2 ++ colour/temperature/__init__.py | 2 ++ colour/utilities/__init__.py | 2 ++ colour/volume/__init__.py | 2 ++ pyproject.toml | 1 - 45 files changed, 92 insertions(+), 10 deletions(-) diff --git a/colour/__init__.py b/colour/__init__.py index d2ac4d58e0..fe7258a020 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 05a13de33c..2947d9ce0a 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 762d95ce45..649004b0b5 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 2e7daba63c..e5c0d248ab 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 e74ed73d47..5f4d7a40e4 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 775792b0e2..acedf72dec 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 af5d4d1cc8..8d46a6835a 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 e32f436ec8..7e6dd99a1c 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 ef485daccb..1f5a77fc38 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 d93d169a04..9d819472cc 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 2b6ad61df5..e67139eeb0 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 ea1a0420cc..0749dc22c3 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 ae7fedf03f..6355f7632a 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 c41e1ab1a1..b8d3e36d87 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 3580d98bc0..fbae3f0607 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 56dbcd2208..13d3311baf 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 68516be701..e75d7ebed3 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 281be06643..109d886845 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 9d1391586d..e2b9e1d59f 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 2acba75657..53f5f7061c 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 013362b2d0..4f51f4a1cc 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 9b55aa2339..d004613c65 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 4f8b370216..91bf3714b3 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 f774194714..caa7830b48 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 ce26ff650c..326ffa2087 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 5b09e748a2..0047dc9069 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 7a668a350d..f16e3c69cc 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 31bdd4e024..c8e08fb3d3 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 ceb2eb42ce..1ae8b910a7 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 aadf162638..72f44e75da 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 6ff2397fc4..6f4b17bae2 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 31f50c424b..42c4de5871 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 d604ee97ba..8982a3c6c9 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 a50c3df392..e9a701864b 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 f080f2fffc..e170745400 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 7f5c514495..225841caad 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 2528d404f7..1e132643cd 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 25062abcec..61d4fadfda 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 c28b4f11b1..960c018800 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 26c68bd9a6..4d4659d362 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 d46c56a2e1..4d3cbe965d 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 c609fd2dcf..c54661a0d9 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 98c888cbd2..1298150655 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 4d04fbba1a..ce1d89f061 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 1700ad5837..a678f5306a 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