style: Fix whitespace and formatting in MarkdownStream class

This commit is contained in:
Paul Gauthier (aider) 2025-01-07 05:57:39 -08:00
parent be82b6bed9
commit f1bd5cdb52

View file

@ -42,11 +42,11 @@ The end.
class MarkdownStream: class MarkdownStream:
"""Streaming markdown renderer that progressively displays content with a live updating window. """Streaming markdown renderer that progressively displays content with a live updating window.
Uses rich.console and rich.live to render markdown content with smooth scrolling and partial updates. Uses rich.console and rich.live to render markdown content with smooth scrolling and partial updates.
Maintains a sliding window of visible content while streaming in new markdown text. Maintains a sliding window of visible content while streaming in new markdown text.
""" """
live = None # Rich Live display instance live = None # Rich Live display instance
when = 0 # Timestamp of last update when = 0 # Timestamp of last update
min_delay = 0.050 # Minimum time between updates (20fps) min_delay = 0.050 # Minimum time between updates (20fps)
@ -54,7 +54,7 @@ class MarkdownStream:
def __init__(self, mdargs=None): def __init__(self, mdargs=None):
"""Initialize the markdown stream. """Initialize the markdown stream.
Args: Args:
mdargs (dict, optional): Additional arguments to pass to rich Markdown renderer mdargs (dict, optional): Additional arguments to pass to rich Markdown renderer
""" """
@ -79,7 +79,7 @@ class MarkdownStream:
def update(self, text, final=False): def update(self, text, final=False):
"""Update the displayed markdown content. """Update the displayed markdown content.
Args: Args:
text (str): New markdown text to append text (str): New markdown text to append
final (bool): If True, this is the final update and we should clean up final (bool): If True, this is the final update and we should clean up