Skip to content

Commit b3a20c8

Browse files
committed
docs: Fix Textual example in gallery
1 parent 9274290 commit b3a20c8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

docs/snippets/gallery/textual.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from textual.app import App, ComposeResult
2-
from textual.pilot import Pilot
32
from textual.widgets import Static
3+
from textual._doc import take_svg_screenshot
44

55

66
class TextApp(App):
@@ -24,8 +24,4 @@ def compose(self) -> ComposeResult:
2424
yield Static("[b]World![/b]")
2525

2626

27-
async def auto_pilot(pilot: Pilot):
28-
pilot.app.exit(pilot.app.export_screenshot())
29-
30-
31-
print(TextApp().run(headless=True, size=(80, 24), auto_pilot=auto_pilot))
27+
print(take_svg_screenshot(app=TextApp(), terminal_size=(80, 24)))

0 commit comments

Comments
 (0)