Actually pass floats when formatting '%f'.

Some of these were pointed out by Anonymous on SourceForge bug #2830659.
master
Heikki Hokkanen 2009-10-26 19:24:44 +02:00
parent 66ce243b65
commit d04805bbad
1 changed files with 3 additions and 3 deletions

View File

@ -675,7 +675,7 @@ class HTMLReportCreator(ReportCreator):
authors.reverse()
commits = data.author_of_month[yymm][authors[0]]
next = ', '.join(authors[1:5])
f.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td><td>%s</td></tr>' % (yymm, authors[0], commits, (100 * commits) / data.commits_by_month[yymm], data.commits_by_month[yymm], next))
f.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td><td>%s</td></tr>' % (yymm, authors[0], commits, (100.0 * commits) / data.commits_by_month[yymm], data.commits_by_month[yymm], next))
f.write('</table>')
@ -687,7 +687,7 @@ class HTMLReportCreator(ReportCreator):
authors.reverse()
commits = data.author_of_year[yy][authors[0]]
next = ', '.join(authors[1:5])
f.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td><td>%s</td></tr>' % (yy, authors[0], commits, (100 * commits) / data.commits_by_year[yy], data.commits_by_year[yy], next))
f.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td><td>%s</td></tr>' % (yy, authors[0], commits, (100.0 * commits) / data.commits_by_year[yy], data.commits_by_year[yy], next))
f.write('</table>')
f.write('</body></html>')
@ -762,7 +762,7 @@ class HTMLReportCreator(ReportCreator):
f.write('<dl>')
f.write('<dt>Total tags</dt><dd>%d</dd>' % len(data.tags))
if len(data.tags) > 0:
f.write('<dt>Average commits per tag</dt><dd>%.2f</dd>' % (data.getTotalCommits() / len(data.tags)))
f.write('<dt>Average commits per tag</dt><dd>%.2f</dd>' % (1.0 * data.getTotalCommits() / len(data.tags)))
f.write('</dl>')
f.write('<table>')