Closed florianfischer91 closed 6 months ago
Thanks @florianfischer9. I've been struggling with this trying to understand the pydantic v2 code.
I think there are still boundary cases. For example,
from __future__ import annotations
from clorm import Predicate, ConstantStr
def test_basic_import():
class P(Predicate):
i: int
c: ConstantStr
class Q(Predicate):
i: int
p: P
p = P(i=1,c="a")
q = Q(i=1,p=p)
But I think this is not how we typically define the clorm schemas so hopefully this solution handles most realistic use-cases. In any case it gives me something to build on. Thanks.
hopefully fixes #129