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:
which returns True if context A can be cast to context B or False otherwise.
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:
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:
which returns True if context A can be cast to context B or False otherwise.