def get_all_re(gitignore_path_list):
    result = {}
    for gitignore_path in gitignore_path_list:
        with open(gitignore_path, "r") as gitignore_file:
            result[gitignore_path] = {1: [], 2: [], 3: []}
            for line in gitignore_file:
                ignore_type, ignore_pattern = get_re_from_single_line(line)
                # If match some file
                if ignore_type:
                    _re = re.compile(ignore_pattern)
                    result[gitignore_path][ignore_type].append(_re)
    return result
Get all compiled regular expression from gitignore_list
dataset/ETHPy150Open brickgao/specchio/specchio/utils.py/get_all_re