Mercurial > hg-stable
changeset 43990:cd96eccd1ce1
annotate: 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/D7753
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 27 Dec 2019 17:58:17 -0500 |
parents | 3622f4fafd35 |
children | 71582c5ad00f |
files | mercurial/commands.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Dec 27 17:54:45 2019 -0500 +++ b/mercurial/commands.py Fri Dec 27 17:58:17 2019 -0500 @@ -559,7 +559,7 @@ ml = max(sizes) formats.append([sep + b' ' * (ml - w) + b'%s' for w in sizes]) else: - formats.append([b'%s' for x in l]) + formats.append([b'%s'] * len(l)) pieces.append(l) for f, p, n in zip(zip(*formats), zip(*pieces), lines):