Skip to content

Commit 4a9d0ec

Browse files
auscompgeekpokey
andauthored
[talon] Omit custom actions from action defaults (#1402)
Whilst this effectively does nothing, adding the empty defaults to two different CSVs seems to have been an oversight. ## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet Co-authored-by: Pokey Rule <[email protected]>
1 parent 1f618a5 commit 4a9d0ec

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/actions/actions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from ..csv_overrides import init_csv_and_watch_changes
44
from ..primitive_target import IMPLICIT_TARGET
55
from .actions_callback import callback_action_defaults, callback_action_map
6-
from .actions_custom import custom_action_defaults
76
from .actions_simple import (
87
no_wait_actions,
98
no_wait_actions_post_sleep,
@@ -83,7 +82,6 @@ def ide_command(command_id: str, target: dict, command_options: dict = {}):
8382
"simple_action": simple_action_defaults,
8483
"positional_action": positional_action_defaults,
8584
"callback_action": callback_action_defaults,
86-
"custom_action": custom_action_defaults,
8785
"swap_action": {"swap": "swapTargets"},
8886
"move_bring_action": {"bring": "replaceWithTarget", "move": "moveToTarget"},
8987
"wrap_action": {"wrap": "wrapWithPairedDelimiter", "repack": "rewrap"},
@@ -95,7 +93,7 @@ def ide_command(command_id: str, target: dict, command_options: dict = {}):
9593
ACTION_LIST_NAMES = default_values.keys()
9694

9795

98-
def on_ready():
96+
def on_ready() -> None:
9997
init_csv_and_watch_changes("actions", default_values)
10098

10199

src/actions/actions_custom.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from ..csv_overrides import SPOKEN_FORM_HEADER, init_csv_and_watch_changes
44

5-
custom_action_defaults = {}
5+
custom_action_defaults: dict[str, str] = {}
66

77

88
mod = Module()
@@ -12,10 +12,10 @@
1212
)
1313

1414

15-
def on_ready():
15+
def on_ready() -> None:
1616
init_csv_and_watch_changes(
1717
"experimental/actions_custom",
18-
custom_action_defaults,
18+
{"custom_action": custom_action_defaults},
1919
headers=[SPOKEN_FORM_HEADER, "VSCode command"],
2020
allow_unknown_values=True,
2121
default_list_name="custom_action",

0 commit comments

Comments
 (0)