in chz/field.py [0:0]
def final_type(self) -> TypeForm:
if not self._name:
raise RuntimeError(
"Something has gone horribly awry; are you using a chz.Field in a dataclass?"
)
# Delay the eval until after the class
if isinstance(self._raw_type, str):
# TODO: handle forward ref
assert self._user_module
if self._user_module not in sys.modules:
raise RuntimeError(
f"Could not find module {self._user_module}; possibly a pickling issue?"
)
user_globals = sys.modules[self._user_module].__dict__
return eval(self._raw_type, user_globals)
return self._raw_type