import typing


def validate_list(expected, lst: list) -> typing.Union[str, bool]:
    """
    Validate a list against our expected schema.

    Returns False if the list is valid.
    Returns error in string format if invalid.
    """

    if not isinstance(lst, list):
        return "Expected argument of type `%s`, got `%s`" % (
            str(expected).replace("typing.", ""),
            type(lst).__name__,
        )

    each_arg_type = typing.get_args(expected)[0]

    for item in lst:
        if not isinstance(item, each_arg_type):
            return "Not all list items are of expected value, `%s`, found `%s`" % (
                each_arg_type.__name__,
                type(item).__name__,
            )

    return False