Mercurial > hg > mercurial-source
diff mercurial/transaction.py @ 22199:b3e51675f98e
cleanup: avoid _ for local unused tmp variables - that is reserved for i18n
_ is usually used for i18n markup but we also used it for I-don't-care
variables.
Instead, name don't-care variables in a slightly descriptive way but use the _
prefix to designate unused variable.
This will mute some pyflakes "import '_' ... shadowed by loop variable"
warnings.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 15 Aug 2014 16:20:47 +0200 (2014-08-15) |
parents | feb4797c676e |
children | f8dc6599da5d |
line wrap: on
line diff
--- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -115,10 +115,10 @@ offsets = [] backups = [] - for f, o, _ in q[0]: + for f, o, _data in q[0]: offsets.append((f, o)) - for f, b, _ in q[1]: + for f, b, _data in q[1]: backups.append((f, b)) d = ''.join(['%s\0%d\n' % (f, o) for f, o in offsets]) @@ -265,7 +265,7 @@ self.opener.unlink(self.journal) if self.opener.isfile(self.backupjournal): self.opener.unlink(self.backupjournal) - for f, b, _ in self.backupentries: + for f, b, _ignore in self.backupentries: self.opener.unlink(b) self.backupentries = [] self.journal = None