-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Please consider functionality that allows to validate if context A can be cast into context B at model definition time even when there is no direct inheritance between A and B. Consider the following example:
from ccflow import ContextBase
class A(ContextBase):
foo: str = "x"
class B(ContextBase):
foo: str = "x"
B.model_validate(A())This is fully supported use case, but the limitation is that it requires an instance of A(). It would be helpful if we could do something like:
B.context_validate(A)which returns True if context A can be cast to context B or False otherwise.
Metadata
Metadata
Assignees
Labels
No labels