Add an __init__ docstring to TextLog

A contribution to #1811.
This commit is contained in:
Dave Pearson
2023-02-22 16:32:45 +00:00
parent a18685c9c8
commit 7a0506a3a2

View File

@@ -45,6 +45,19 @@ class TextLog(ScrollView, can_focus=True):
classes: str | None = None,
disabled: bool = False,
) -> None:
"""Create a TextLog widget.
Args:
max_lines: Maximum number of lines in the log or `None` for no maximum.
min_width: Minimum width of renderables.
wrap: Enable word wrapping (default is off).
highlight: Automatically highlight content.
markup: Apply Rich console markup.
name: The name of the button.
id: The ID of the button in the DOM.
classes: The CSS classes of the button.
disabled: Whether the button is disabled or not.
"""
super().__init__(name=name, id=id, classes=classes, disabled=disabled)
self.max_lines = max_lines
self._start_line: int = 0