sob/meta.py
def _traverse_models(
    model_instance: abc.Model,
) -> Iterable[abc.Model]:
    """
    Iterate over all child model instances
    """
    if isinstance(model_instance, abc.Dictionary):
        for value in model_instance.values():
            if isinstance(
                value,
                (abc.Object, abc.Dictionary, abc.Array),
            ):
                yield value
    elif isinstance(model_instance, abc.Object):
        property_name: str
        for property_name in _read_object_property_names(model_instance):
            value = getattr(model_instance, property_name)
            if isinstance(
                value,
                (abc.Object, abc.Dictionary, abc.Array),
            ):
                yield value
    elif isinstance(model_instance, abc.Array):
        for value in model_instance:
            if isinstance(
                value,
                (abc.Object, abc.Dictionary, abc.Array),
            ):
                yield value

    Iterate over all child model instances
    
Iterate over all child model instances
Iterate over all child model instances
def _traverse_models(
    model_instance: abc.Model,
) -> Iterable[abc.Model]:
    if isinstance(model_instance, abc.Dictionary):
        for value in model_instance.values():
            if isinstance(
                value,
                (abc.Object, abc.Dictionary, abc.Array),
            ):
                yield value
    elif isinstance(model_instance, abc.Object):
        property_name: str
        for property_name in _read_object_property_names(model_instance):
            value = getattr(model_instance, property_name)
            if isinstance(
                value,
                (abc.Object, abc.Dictionary, abc.Array),
            ):
                yield value
    elif isinstance(model_instance, abc.Array):
        for value in model_instance:
            if isinstance(
                value,
                (abc.Object, abc.Dictionary, abc.Array),
            ):
                yield value
def _traverse_models ( model_instance : abc . Model , ) -> Iterable [ abc . Model ] : if isinstance ( model_instance , abc . Dictionary ) : for value in model_instance . values ( ) : if isinstance ( value , ( abc . Object , abc . Dictionary , abc . Array ) , ) : yield value elif isinstance ( model_instance , abc . Object ) : property_name : str for property_name in _read_object_property_names ( model_instance ) : value = getattr ( model_instance , property_name ) if isinstance ( value , ( abc . Object , abc . Dictionary , abc . Array ) , ) : yield value elif isinstance ( model_instance , abc . Array ) : for value in model_instance : if isinstance ( value , ( abc . Object , abc . Dictionary , abc . Array ) , ) : yield value
Iterate over all child model instances
Iterate over all child model instances
"""
    Iterate over all child model instances
    """
model_instance
abc.Model