diff --git a/configurize/config.py b/configurize/config.py index 0c78bb3..4f8424f 100644 --- a/configurize/config.py +++ b/configurize/config.py @@ -11,7 +11,7 @@ from .allowed_types import recur_to_allowed_types from .data_class import DataClass -from .reference import Ref +from .reference import CfgReferenceError, Ref from .utils import get_func_brief, writable_property @@ -196,7 +196,7 @@ def _deref(self, name, value, deref=True): else: value.cur_value = cur except (AttributeError, AssertionError, TypeError): - if value.default is ReferenceError: + if value.default is CfgReferenceError: if deref: raise value.default( f"Unable to find reference of <{value.ref_str}> @ {self._class_name}" diff --git a/configurize/reference.py b/configurize/reference.py index 58318c2..bce7e4a 100644 --- a/configurize/reference.py +++ b/configurize/reference.py @@ -1,4 +1,4 @@ -class ReferenceError(LookupError): +class CfgReferenceError(LookupError): def __str__(self): import traceback @@ -45,7 +45,7 @@ class Exp: } """ - def __init__(self, ref_str: str, default=ReferenceError): + def __init__(self, ref_str: str, default=CfgReferenceError): assert ref_str.startswith(".") self.ref_str = ref_str self.actions = self._parse_level(ref_str) diff --git a/pyproject.toml b/pyproject.toml index 2003e82..4af4c9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "configurize" -version = "0.1.2" +version = "0.1.3" description = "Hierarchical configuration management with inheritance, cross-references, and diffing" readme = "README.md" license = {text = "MIT"}