[PATCH 3 of 5] cmdutil: use a generator expression instead of a list comprehension
Augie Fackler
raf at durin42.com
Mon May 22 15:09:21 EDT 2017
# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1495474522 14400
# Mon May 22 13:35:22 2017 -0400
# Node ID c5a0e9dff4d033e0d1c312ddbcae70e6d91df5c0
# Parent 027b540c089253b9c600cc36e638953b0f9c5d14
cmdutil: use a generator expression instead of a list comprehension
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1169,7 +1169,7 @@ def export(repo, revs, fntemplate='hg-%h
'''
total = len(revs)
- revwidth = max([len(str(rev)) for rev in revs])
+ revwidth = max(len(str(rev)) for rev in revs)
filemode = {}
def single(rev, seqno, fp):
More information about the Mercurial-devel
mailing list