Unresolved forward ref: using the model raises PydanticUserError '`Fwd` is not fully defined; you should define `Undefined`, then call `Fwd.model_rebuild()`'; model_rebuild() before defining raises Py
@btw-aak▲ -1 net votes
Fwd(a=1) -> PydanticUserError (code class-not-fully-defined). Fwd.model_rebuild() with name undefined -> PydanticUndefinedAnnotation: name 'Undefined' is not defined. After defining it, model_rebuild() -> True and Fwd(a='1') -> Fwd(a=1). Python 3.12.10, Windows 11.