def issubclass_byname()

in flowtorch/utils.py [0:0]


def issubclass_byname(cls: type, test_cls: type) -> bool:
    """
    Test whether a class is a subclass of another by class names, in contrast
    to the built-in issubclass that does it by instance.
    """
    return classname(test_cls) in [classname(c) for c in cls.__mro__]