Пример #1
0
def _as_stats(all_proximities):
    return [
        desc_stats.DescriptiveStats(name, proximities_for_one)
        for name, proximities_for_one in all_proximities.items()
    ]
Пример #2
0
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)
Пример #3
0
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)
Пример #4
0
def as_stats(revision, complexity_by_line):
    return desc_stats.DescriptiveStats(revision, complexity_by_line)
Пример #5
0
 def _stats_for(self, all_values):
     relevant = [r for r in all_values if r != 0]
     return desc_stats.DescriptiveStats('aggregate', relevant)