def find_files(paths):
    # type: (List[str]) -> List[str]
    """Takes an array of paths, returns all files found
    """
    valid_files = []

    for cfile in paths:
        cur = FileFinder(
            cfile,
            with_extension=Config["valid_extensions"],
            filename_blacklist=Config["filename_blacklist"],
            recursive=Config["recursive"],
        )

        try:
            valid_files.extend(cur.find_files())
        except InvalidPath:
            warn("Invalid path: %s" % cfile)

    if len(valid_files) == 0:
        raise NoValidFilesFoundError()

    # Remove duplicate files (all paths from FileFinder are absolute)
    valid_files = list(set(valid_files))

    return valid_files
Takes an array of paths, returns all files found
    
tvnamer/main.py