RAIMAD

Function is_compo_class from raimad.helpers

def is_compo_class(obj: type) -> bool
Check whether an object is a CompoType.

Note that this returns False on the `rai.Compo`
abstract base class.
Click to show code
def is_compo_class(obj: type) -> bool:
    """
    Check whether an object is a CompoType.

    Note that this returns False on the `rai.Compo`
    abstract base class.
    """
    return (
        isinstance(obj, type)
        and issubclass(obj, rai.Compo)
        and obj is not rai.Compo
        )