You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When resolving the schema members of Attribute, we should be able to correctly interpret the "Expression" and "PlainType" forward references. What we currently get is
File "/Users/niklas.rosenstein/gitme/kraken/.venvs/3.10.2/lib/python3.10/site-packages/typeapi/model.py", line 277, in evaluate
raise RuntimeError(f'no module or namespace to evaluate {self}')
RuntimeError: no module or namespace to evaluate ForwardRef('Expression')
A workaround for now is to explicitly pass the module name to a typing.ForwardRef() object:
I think that unfortunately we won't be able to tell where the forward reference was defined originally (i.e. if it was imported from another module, we won't be able to detect that to use that module's scope for evaluation), but at least within the same module of the type that we're evaluating it's members from we should try to resolve it in that type's module.
The text was updated successfully, but these errors were encountered:
Example:
When resolving the schema members of
Attribute
, we should be able to correctly interpret the"Expression"
and"PlainType"
forward references. What we currently get isA workaround for now is to explicitly pass the module name to a
typing.ForwardRef()
object:I think that unfortunately we won't be able to tell where the forward reference was defined originally (i.e. if it was imported from another module, we won't be able to detect that to use that module's scope for evaluation), but at least within the same module of the type that we're evaluating it's members from we should try to resolve it in that type's module.
The text was updated successfully, but these errors were encountered: