Remove "colour.utilities.data_structures.attest" definition.
@@ -56,7 +56,6 @@ __email__ = "colour-developers@colour-science.org"
__status__ = "Production"
__all__ = [
- "attest",
"Structure",
"Lookup",
"CaseInsensitiveMapping",
@@ -65,24 +64,6 @@ __all__ = [
]
-def attest(condition: Boolean, message: str = ""):
- """
- Provide the `assert` statement functionality without being disabled by
- optimised Python execution.
-
- See :func:`colour.utilities.assert` for more information.
-
- Notes
- -----
- - This definition is duplicated to avoid import circular dependency.
- """
-
- # Avoiding circular dependency.
- import colour.utilities
-
- colour.utilities.attest(condition, message)
-
-
class Structure(dict):
"""
Define a :class:`dict`-like object allowing to access key values using dot
@@ -759,6 +740,8 @@ class Node:
def name(self, value: str):
"""Setter for the **self.name** property."""
+ from colour.utilities import attest
+
attest(
isinstance(value, str),
f'"name" property: "{value}" type is not "str"!',
@@ -788,6 +771,8 @@ class Node:
def parent(self, value: Optional[Node]):
"""Setter for the **self.parent** property."""
+ from colour.utilities import attest
+
if value is not None:
attest(
issubclass(value.__class__, Node),
@@ -821,6 +806,8 @@ class Node:
def children(self, value: List[Node]):
"""Setter for the **self.children** property."""
+ from colour.utilities import attest
+
attest(
isinstance(value, list),
f'"children" property: "{value}" type is not a "list" instance!',
