from typing import List


def filter_import_names(names: List[str], exclude: List[str]) -> List[str]:
    """
    filter the given import names by the list of (sub)folders / imports to exclude.
    :param names: list of import names.
    :param exclude: list of (sub)folders/imports to exclude.
    :return: list of filtered import names.
    """
    return [name for name in names if not any([item in name for item in exclude])]