diff mercurial/lsprofcalltree.py @ 43076:2372284d9457

formatting: blacken the codebase This is using my patch to black (https://github.com/psf/black/pull/826) so we don't un-wrap collection literals. Done with: hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S # skip-blame mass-reformatting only # no-check-commit reformats foo_bar functions Differential Revision: https://phab.mercurial-scm.org/D6971
author Augie Fackler <augie@google.com>
date Sun, 06 Oct 2019 09:45:02 -0400
parents 720355c7b7c9
children 687b865b95ad
line wrap: on
line diff
--- a/mercurial/lsprofcalltree.py	Sat Oct 05 10:29:34 2019 -0400
+++ b/mercurial/lsprofcalltree.py	Sun Oct 06 09:45:02 2019 -0400
@@ -12,18 +12,20 @@
 
 from __future__ import absolute_import
 
-from . import (
-    pycompat,
-)
+from . import pycompat
+
 
 def label(code):
     if isinstance(code, str):
         # built-in functions ('~' sorts at the end)
         return '~' + pycompat.sysbytes(code)
     else:
-        return '%s %s:%d' % (pycompat.sysbytes(code.co_name),
-                             pycompat.sysbytes(code.co_filename),
-                             code.co_firstlineno)
+        return '%s %s:%d' % (
+            pycompat.sysbytes(code.co_name),
+            pycompat.sysbytes(code.co_filename),
+            code.co_firstlineno,
+        )
+
 
 class KCacheGrind(object):
     def __init__(self, profiler):
@@ -86,8 +88,9 @@
             out_file.write(b'calls=%d 0\n' % subentry.callcount)
         else:
             out_file.write(b'cfi=%s\n' % pycompat.sysbytes(code.co_filename))
-            out_file.write(b'calls=%d %d\n' % (
-                subentry.callcount, code.co_firstlineno))
+            out_file.write(
+                b'calls=%d %d\n' % (subentry.callcount, code.co_firstlineno)
+            )
 
         totaltime = int(subentry.totaltime * 1000)
         out_file.write(b'%d %d\n' % (lineno, totaltime))