# HG changeset patch # User Martin von Zweigbergk # Date 2019-08-30 22:12:37 # Node ID 3f81d58aae25dda07178cbe125e4439c53f19ccb # Parent a3c2ffcd266f33608ac1694ed7daece0bd85d52b statprof: clarify by naming tuple members while enumerate()'ing Differential Revision: https://phab.mercurial-scm.org/D6778 diff --git a/mercurial/statprof.py b/mercurial/statprof.py --- a/mercurial/statprof.py +++ b/mercurial/statprof.py @@ -878,7 +878,8 @@ def write_to_chrome(data, fp, minthresho laststack = collections.deque(stack) while laststack: poplast() - events = [s[1] for s in enumerate(samples) if s[0] not in blacklist] + events = [sample for idx, sample in enumerate(samples) + if idx not in blacklist] frames = collections.OrderedDict((str(k), v) for (k,v) in enumerate(id2stack)) json.dump(dict(traceEvents=events, stackFrames=frames), fp, indent=1)