from typing import List


def iter_through_class_hierarchy(cls: type) -> List[type]:
    """
    Iterate thru a class hierarchy and return all bases.

    :param cls: Type
    :return: List of bases
    """
    collector = []

    def _inner(cls_):
        if cls_ == object:
            return
        for base in cls_.__bases__:
            collector.append(base)
            _inner(base)

    _inner(cls)
    return collector