diff --git a/pyinstrument/profiler.py b/pyinstrument/profiler.py index ab1434dd..61d157ce 100644 --- a/pyinstrument/profiler.py +++ b/pyinstrument/profiler.py @@ -258,8 +258,9 @@ def print( color: bool | None = None, show_all: bool = False, timeline: bool = False, + flat: bool = False, ): - """print(file=sys.stdout, *, unicode=None, color=None, show_all=False, timeline=False) + """print(file=sys.stdout, *, unicode=None, color=None, show_all=False, timeline=False, flat=False) Print the captured profile to the console. @@ -268,6 +269,7 @@ def print( :param color: Override ANSI color support detection. :param show_all: Sets the ``show_all`` parameter on the renderer. :param timeline: Sets the ``timeline`` parameter on the renderer. + :param flat: Sets the ``flat`` parameter on the renderer. """ if unicode is None: unicode = file_supports_unicode(file) @@ -280,6 +282,7 @@ def print( color=color, show_all=show_all, timeline=timeline, + flat=flat, ), file=file, ) @@ -290,13 +293,14 @@ def output_text( color: bool = False, show_all: bool = False, timeline: bool = False, + flat: bool = False, ) -> str: """ Return the profile output as text, as rendered by :class:`ConsoleRenderer` """ return self.output( renderer=renderers.ConsoleRenderer( - unicode=unicode, color=color, show_all=show_all, timeline=timeline + unicode=unicode, color=color, show_all=show_all, timeline=timeline, flat=flat ) )