MCPcopy
hub / github.com/pydantic/pydantic / Foo

Class Foo

tests/test_forward_ref.py:54–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 from pydantic import BaseModel, PydanticUserError
53
54 class Foo(BaseModel):
55 a: Optional['Bar'] = None
56
57 with pytest.raises(PydanticUserError, match='`Foo` is not fully defined; you should define `Bar`,'):
58 Foo(a={'b': {'a': {}}})

Callers 4

moduleFunction · 0.70

Calls 1

FieldFunction · 0.90

Tested by 4

moduleFunction · 0.56