Mercurial > public > mercurial-scm > hg
diff hgext/absorb.py @ 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 | 4aa72cdf616f |
children | e1ecfc7c84be |
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):