changeset 22478:a6b1413511f1

annotate: remove unused variable in calculation of column widths
author Yuya Nishihara <yuya@tcha.org>
date Fri, 29 Aug 2014 06:19:32 +0200
parents 3c8ae79eacb0
children 5d9e46d93c1d
files mercurial/commands.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Aug 29 05:36:52 2014 +0200
+++ b/mercurial/commands.py	Fri Aug 29 06:19:32 2014 +0200
@@ -319,10 +319,9 @@
         for f, sep in funcmap:
             l = [f(n) for n, dummy in lines]
             if l:
-                sized = [(x, encoding.colwidth(x)) for x in l]
-                ml = max([w for x, w in sized])
-                formats.append([sep + ' ' * (ml - w) + '%s'
-                                for x, w in sized])
+                sizes = [encoding.colwidth(x) for x in l]
+                ml = max(sizes)
+                formats.append([sep + ' ' * (ml - w) + '%s' for w in sizes])
                 pieces.append(l)
 
         for f, p, l in zip(zip(*formats), zip(*pieces), lines):