fastannotate: fix pyflakes error

This is to fix the following error discovered by pyflakes:

  fastannotate/context.py:407: list comprehension redefines 'f' from line 352

The change is necessary after upstream changeset 4173d21a33de, which enables
the check.
This commit is contained in:
Jun Wu 2016-11-16 22:19:34 +00:00
parent 06d00be6b9
commit 5ee154b2f6

View File

@ -403,8 +403,8 @@ class _annotatecontext(object):
self.ui.write() self.ui.write()
result = [ result = [
((self.revmap.rev2hsh(f) if isinstance(f, int) else f.node()), l) ((self.revmap.rev2hsh(fr) if isinstance(fr, int) else fr.node()), l)
for f, l in hist[revfctx][0]] for fr, l in hist[revfctx][0]] # [(node, linenumber)]
return self._refineannotateresult(result, revfctx, showpath, showlines) return self._refineannotateresult(result, revfctx, showpath, showlines)
def canannotatedirectly(self, rev): def canannotatedirectly(self, rev):