def _as_stats(all_proximities): return [ desc_stats.DescriptiveStats(name, proximities_for_one) for name, proximities_for_one in all_proximities.items() ]
def run(args): with open(args.file, "r") as file_to_calc: complexity_by_line = complexity_calculations.calculate_complexity_in( file_to_calc.read()) stats = desc_stats.DescriptiveStats(args.file, complexity_by_line) as_csv(stats)
def run_file(filename, writer): with open(filename, "r") as file_to_calc: complexity_by_line = complexity_calculations.calculate_complexity_in( file_to_calc.read()) stats = desc_stats.DescriptiveStats(filename, complexity_by_line) writer.print_stats(filename, stats)
def as_stats(revision, complexity_by_line): return desc_stats.DescriptiveStats(revision, complexity_by_line)
def _stats_for(self, all_values): relevant = [r for r in all_values if r != 0] return desc_stats.DescriptiveStats('aggregate', relevant)