def add_project_totals(project_report, file_reports):
    project_report['file_count'] = len(file_reports)
    project_report['function_count'] = 0
    project_report['line_count'] = 0
    project_report['lines_ending_in_whitespace_count'] = 0
    project_report['line_length_distribution'] = {}
    project_report['line_indent_distribution'] = {}
    for (filename, file_report) in file_reports.items():
        if (file_report == {}):
            continue
        project_report['function_count'] += len(file_report['functions'])
        project_report['line_count'] += file_report['line_count']
def add_project_totals(project_report, file_reports):
    project_report['file_count'] = len(file_reports)
    project_report['function_count'] = 0
    project_report['line_count'] = 0
    project_report['lines_ending_in_whitespace_count'] = 0
    project_report['line_length_distribution'] = {}
    project_report['line_indent_distribution'] = {}
    for (filename, file_report) in file_reports.items():
        if (file_report == {}):
            continue
        project_report['function_count'] += len(file_report['functions'])
        project_report['line_count'] += file_report['line_count']