(files)
return list(filter(lambda x: is_solution(x[2]), solutions)), build_files
Analyse files to return two lists :
        - solutions : list of files as 3-uple of strings that are more likely solutions
          on the format: (ProblemXXX, 'Lang', 'solution_x.y')
        - build_files : list of files that are more build files (stats.py,
          stats.exs, ...)
Analyse files to return two lists :
        - solutions : list of files as 3-uple of strings that are more likely solutions
          on the format: (ProblemXXX, 'Lang', 'solution_x.y')
        - build_files : list of files that are more build files (stats.py,
          stats.exs, ...)
Analyse files to return two lists : - solutions : list of files as 3 - uple of strings that are more likely solutions on the format : ( ProblemXXX Lang solution_x . y ) - build_files : list of files that are more build files ( stats . py stats . exs ... )
def handle_files(files):
    """
    Analyse files to return two lists :
        - solutions : list of files as 3-uple of strings that are more likely solutions
          on the format: (ProblemXXX, 'Lang', 'solution_x.y')
        - build_files : list of files that are more build files (stats.py,
          stats.exs, ...)
    """
    solutions = []
    build_files = []
    for f in files:
        if f.count("/") == 2:
            solutions.append(tuple(f.split("/")))
        elif f.count("/") == 1 and f.startswith("./"):
            dic = parse_solutions(walk_problems(f))
            problem = list(dic.keys())[0]
            for lang in dic[problem]:
                for solution in dic[problem][lang]:
                    solutions.append((problem, lang, solution))
        elif f.count("/") == 0 and f in BUILD_FILES:
            build_files.append(f)
    return list(filter(lambda x: is_solution(x[2]), solutions)), build_files
def handle_files ( files ) : solutions = [ ] build_files = [ ] for f in files : if f . count ( "/" ) == 2 : solutions . append ( tuple ( f . split ( "/" ) ) ) elif f . count ( "/" ) == 1 and f . startswith ( "./" ) : dic = parse_solutions ( walk_problems ( f ) ) problem = list ( dic . keys ( ) ) [ 0 ] for lang in dic [ problem ] : for solution in dic [ problem ] [ lang ] : solutions . append ( ( problem , lang , solution ) ) elif f . count ( "/" ) == 0 and f in BUILD_FILES : build_files . append ( f ) return list ( filter ( lambda x : is_solution ( x [ 2 ] ) , solutions ) ) , build_files