# HG changeset patch # User Matt Harbison # Date 2019-12-27 23:21:41 # Node ID 801b8d314791d31244f50aaec7c14efa4b5b0950 # Parent de7838053207efc8ce3cd870053004b99f2778dd 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 diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -308,7 +308,7 @@ Commands: 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)