Mercurial > hg
changeset 43983:236cec445be2
absorb: 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/D7751
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 27 Dec 2019 17:53:56 -0500 |
parents | bd3fa45c0662 |
children | 3622f4fafd35 |
files | hgext/absorb.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/absorb.py Fri Dec 27 16:57:28 2019 -0500 +++ b/hgext/absorb.py Fri Dec 27 17:53:56 2019 -0500 @@ -511,7 +511,7 @@ if not editedtext: raise error.Abort(_(b'empty editor text')) # parse edited result - contents = [b'' for i in self.fctxs] + contents = [b''] * len(self.fctxs) leftpadpos = 4 colonpos = leftpadpos + len(visiblefctxs) + 1 for l in mdiff.splitnewlines(editedtext):