Skip to content

Commit a5035ac

Browse files
committed
Docstrings
1 parent bd93bb7 commit a5035ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/open_link.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44

55

66
class OpenLink(App[None]):
7+
"""Demonstrates opening a URL in the same tab or a new tab."""
8+
79
def compose(self) -> ComposeResult:
810
yield Button("Visit the Textual docs", id="open-link-same-tab")
911
yield Button("Visit the Textual docs in a new tab", id="open-link-new-tab")
1012

1113
@on(Button.Pressed)
1214
def open_link(self, event: Button.Pressed) -> None:
15+
"""Open the URL in the same tab or a new tab depending on which button was pressed."""
1316
self.open_url(
1417
"https://textual.textualize.io",
1518
new_tab=event.button.id == "open-link-new-tab",

0 commit comments

Comments
 (0)