Created
December 6, 2024 16:24
-
-
Save cmutel/72e802d436532beace72d2a894ab49e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Type | |
from pydantic import BaseModel | |
class Foo(BaseModel): | |
pass | |
class FooChild(Foo): | |
pass | |
class Bar(BaseModel): | |
node: Type[Foo] | |
Bar(node=FooChild()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment