Skip to content

Commit 36043f5

Browse files
committed
Add docstring to DevConsoleHeader
1 parent fcda083 commit 36043f5

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/textual_dev/renderables.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121

2222

2323
class DevConsoleHeader:
24+
"""Renderable representing the header at the top of the console
25+
26+
Args:
27+
port: The port the devtools server is running on.
28+
verbose: Whether verbose logging is enabled
29+
"""
30+
2431
def __init__(self, port: int | None = None, verbose: bool = False) -> None:
2532
self.port = port
2633
self.verbose = verbose
@@ -47,6 +54,11 @@ def __rich_console__(
4754
yield new_line
4855

4956
def _run_command(self) -> str:
57+
"""Get help text for the user to connect to the console
58+
59+
Returns:
60+
The command a user can run to connect a Textual app to the dev server
61+
"""
5062
if self.port:
5163
return f"textual run --port {self.port} --dev my_app.py"
5264
else:

src/textual_dev/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(
3737
Args:
3838
update_frequency: The number of seconds to wait between
3939
sending updates of the console size to connected clients.
40-
port: Port console is running on.
40+
port: The port the devtools server is running on.
4141
verbose: Enable verbose logging on client.
4242
exclude: List of log groups to exclude from output.
4343
"""

0 commit comments

Comments
 (0)