[diffoscope] 01/03: diffoscope.profiling: Pluralise "n call/calls"

Chris Lamb chris at chris-lamb.co.uk
Sun Jan 1 18:41:43 CET 2017


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit 1f0394969b7e2d0ebd8f9af427ca3d613eec5907
Author: Chris Lamb <lamby at debian.org>
Date:   Sun Jan 1 17:28:56 2017 +0000

    diffoscope.profiling: Pluralise "n call/calls"
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/profiling.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/diffoscope/profiling.py b/diffoscope/profiling.py
index 7ec9da8..31b0737 100644
--- a/diffoscope/profiling.py
+++ b/diffoscope/profiling.py
@@ -67,8 +67,9 @@ class ProfileManager(object):
             print("\n{}\n{}\n".format(subtitle, "-" * len(subtitle)))
 
             for value, totals in sorted(keys.items(), key=lambda x: x[1]['time'], reverse=True):
-                print("  {:10.3f}s {:5d} calls    {}".format(
+                print("  {:10.3f}s {:5d} call{}    {}".format(
                     totals['time'],
                     totals['count'],
+                    ' ' if totals['count'] == 1 else 's',
                     value,
                 ))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list