comparison mercurial/statprof.py @ 52638:dc36535a5edc

style: drop extraneous parentheses These were rewritten by `pyupgrade`.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 06 Jan 2025 14:07:43 -0500
parents f4d1f0713b49
children 4cb75772818d
comparison
equal deleted inserted replaced
52637:3b6f25190157 52638:dc36535a5edc
957 # events given only stack snapshots. 957 # events given only stack snapshots.
958 958
959 for sample in data.samples: 959 for sample in data.samples:
960 stack = tuple( 960 stack = tuple(
961 ( 961 (
962 ( 962 '%s:%d'
963 '%s:%d' 963 % (
964 % ( 964 simplifypath(pycompat.sysstr(frame.path)),
965 simplifypath(pycompat.sysstr(frame.path)), 965 frame.lineno or -1,
966 frame.lineno or -1, 966 ),
967 ), 967 pycompat.sysstr(frame.function),
968 pycompat.sysstr(frame.function), 968 )
969 ) 969 for frame in sample.stack
970 for frame in sample.stack
971 )
972 ) 970 )
973 qstack = collections.deque(stack) 971 qstack = collections.deque(stack)
974 if laststack == qstack: 972 if laststack == qstack:
975 continue 973 continue
976 while laststack and qstack and laststack[-1] == qstack[-1]: 974 while laststack and qstack and laststack[-1] == qstack[-1]: