def filter_path_matches(match_text, file_list, case_sensitive):
 files = set(file_list)
 files_and_dirs = utils.add_parents(files)
 dirs = files_and_dirs.difference(files)
 paths = filter_matches(match_text, files_and_dirs, case_sensitive)
 return (paths, dirs)

def filter_path_matches ( match_text , file_list , case_sensitive ) : files = set ( file_list ) files_and_dirs = utils . add_parents ( files ) dirs = files_and_dirs . difference ( files ) paths = filter_matches ( match_text , files_and_dirs , case_sensitive ) return ( paths , dirs )
return matching completions from a list of candidate files .