import inspect


def is_enum(e: type) -> bool:
    """Check if the given class is an enumeration.

    Args:
        e: The class object to check.

    Returns: True if the object is an enumeration (boost::python enumeration, not
        python) False otherwize.
    """
    # Yet to find a better way...
    if not isinstance(e, type):
        return False
    return any(
        "{}.{}".format(c.__module__, c.__name__) == "Boost.Python.enum"
        for c in inspect.getmro(e)
    )