changeset 43995:801b8d314791

histedit: avoid using a list comprehension to fill a list with fixed values Flagged by PyCharm as an unused assignment for the variable in the list. Differential Revision: https://phab.mercurial-scm.org/D7762
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 27 Dec 2019 18:21:41 -0500
parents de7838053207
children 6dbb18e1ac8d
files hgext/histedit.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/histedit.py	Sat Dec 28 09:55:45 2019 -0800
+++ b/hgext/histedit.py	Fri Dec 27 18:21:41 2019 -0500
@@ -308,7 +308,7 @@
         if len(a.verbs):
             v = b', '.join(sorted(a.verbs, key=lambda v: len(v)))
         actions.append(b" %s = %s" % (v, lines[0]))
-        actions.extend([b'  %s' for l in lines[1:]])
+        actions.extend([b'  %s'] * (len(lines) - 1))
 
     for v in (
         sorted(primaryactions)