Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I was wondering what the best way to validate subclasses is?
import pydantic class MyClass: pass class MySubClass(MyClass): pass class MyOtherClass: pass class Foo(BaseModel): a_class_not_an_object: Type[MyClass]
where I would expect both
to work, but
to throw an error.
Have a good weekend :)