From a29f66e7533feb5449e88f4f2561c5f6c2f19193 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Fri, 29 Aug 2014 06:19:32 +0200 Subject: [PATCH] annotate: remove unused variable in calculation of column widths --- mercurial/commands.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mercurial/commands.py b/mercurial/commands.py index 3370dc1aac..12e6445ab6 100644 --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -319,10 +319,9 @@ def annotate(ui, repo, *pats, **opts): 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):