Skip to content

Commit 002cbab

Browse files
committed
add pause to action
1 parent 621e96d commit 002cbab

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/guide/actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ When you click any of the links, Textual runs the `"set_background"` action to c
7575

7676
## Bindings
7777

78-
Textual will also run actions bound to keys. The following example adds key [bindings](./input.md#bindings) for the ++r++, ++g++, and ++b++ keys which call the `"set_background"` action.
78+
Textual will run actions bound to keys. The following example adds key [bindings](./input.md#bindings) for the ++r++, ++g++, and ++b++ keys which call the `"set_background"` action.
7979

8080
=== "actions04.py"
8181

@@ -92,7 +92,7 @@ If you run this example, you can change the background by pressing keys in addit
9292

9393
## Namespaces
9494

95-
Textual will look for action methods on the widget or app where they are used. If we were to create a [custom widget](./widgets.md#custom-widgets) it can have its own set of actions.
95+
Textual will look for action methods in the class where they are defined (App, Screen, or Widget). If we were to create a [custom widget](./widgets.md#custom-widgets) it can have its own set of actions.
9696

9797
The following example defines a custom widget with its own `set_background` action.
9898

tests/snapshot_tests/test_snapshots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,6 @@ def test_demo(snap_compare):
173173
"""Test the demo app (python -m textual)"""
174174
assert snap_compare(
175175
Path("../../src/textual/demo.py"),
176-
press=["down", "down", "down"],
176+
press=["down", "down", "down", "_"],
177177
terminal_size=(100, 30),
178178
)

tests/test_binding_inheritance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ def on_mount(self) -> None:
640640
# Check the NoHandle widget has focus
641641
assert pilot.app.query_one(NoHandle).has_focus
642642
# Press the "t" key
643-
await pilot.press("t", "_")
643+
await pilot.press("t")
644644
# Check the action on the no handle widget was called
645645
assert no_handle_invoked
646646
# Check the return value, confirming that the action on Handle was called

0 commit comments

Comments
 (0)