Skip to content

Commit 3143de0

Browse files
ConchylicultorThe kauldron Authors
authored andcommitted
Do not trigger dynamic resolve in konfig
PiperOrigin-RevId: 869165908
1 parent 122b1dd commit 3143de0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kauldron/konfig/configdict_proxy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import dataclasses
2222
import functools
2323
import importlib
24+
import inspect
2425
import itertools
2526
import typing
2627
from typing import Any, TypeVar
@@ -259,7 +260,7 @@ def _resolve_dict(self, value):
259260
e = _wrap_cfg_error(e, value, frame=value._frame) # pylint: disable=protected-access
260261
raise e from e.__cause__
261262
# Allow the object to save the config it is comming from.
262-
if hasattr(type(obj), '__post_konfig_resolve__'):
263+
if inspect.getattr_static(type(obj), '__post_konfig_resolve__', None):
263264
obj.__post_konfig_resolve__(value)
264265
self._id_to_obj[id(value)] = utils.CachedObj(ref=value, value=obj)
265266
return obj

0 commit comments

Comments
 (0)