File tree Expand file tree Collapse file tree 3 files changed +23
-10
lines changed Expand file tree Collapse file tree 3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -104,14 +104,9 @@ class RGBDisplayColourspace:
104104 ALL : ClassVar [tuple [str , ...]] = (SRGB , DCI_P3 )
105105
106106
107- class CAT :
108- """Constants for the chromatic adaptation transforms."""
109-
110- DEFAULT : ClassVar [str ] = "CAT02"
111-
112- @classmethod
107+ class CATMeta (type ):
113108 @property
114- def ALL (cls ) -> Tuple [str ]:
109+ def ALL (cls ) -> Tuple [str , ... ]:
115110 """
116111 Return all the available chromatic adaptation transforms.
117112
@@ -120,8 +115,13 @@ def ALL(cls) -> Tuple[str]:
120115 :class:`tuple`
121116 Available chromatic adaptation transforms.
122117 """
118+ return (* sorted (colour .CHROMATIC_ADAPTATION_TRANSFORMS ), "None" )
123119
124- return * sorted (colour .CHROMATIC_ADAPTATION_TRANSFORMS ), "None"
120+
121+ class CAT (metaclass = CATMeta ):
122+ """Constants for the chromatic adaptation transforms."""
123+
124+ DEFAULT : ClassVar [str ] = "CAT02"
125125
126126
127127class OptimizationSpace :
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ classifiers = [
4141]
4242
4343[tool .poetry .dependencies ]
44- python = " >= 3.11, < 3.13 "
44+ python = " >= 3.11, < 3.14 "
4545colour-datasets = " >= 0.2.5"
4646colour-checker-detection = " >= 0.2.1"
4747colour_science = " >= 0.4.5"
@@ -51,7 +51,7 @@ dash-renderer = "*"
5151dash-uploader = " *"
5252gunicorn = " *"
5353imageio = " >= 2, < 3"
54- pandas = " >= 1.4, < 2"
54+ pandas = " >= 1.4, < 2.3 "
5555jsonpickle = " >= 2, < 3"
5656matplotlib = " >= 3.5, != 3.5.0, != 3.5.1"
5757networkx = " >= 2.7, < 3"
Original file line number Diff line number Diff line change 1+ """
2+ Unit tests for the constants module
3+ """
4+ from aces .idt .core import constants
5+ from tests .test_utils import TestIDTBase
6+
7+
8+ class Test_IDTConstants (TestIDTBase ):
9+ """Class which holds the unit tests for the constants module"""
10+
11+ def test_class_property_deprecation (self ):
12+ """Test the deprecation of the classmethod and property in python3.11"""
13+ self .assertEqual (len (constants .CAT .ALL ), 13 )
You can’t perform that action at this time.
0 commit comments