Skip to content

Commit 83db28a

Browse files
authored
[talon] Fix confusing replace action type hint (#1401)
The type hint `list[str] or dict` always evaluated to `list[str]` at runtime. `cursorless_replace` was only ever used in homophones and reformat, both of which always pass a list. ## 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
1 parent 906a2ae commit 83db28a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/actions/replace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
@mod.action_class
77
class Actions:
8-
def cursorless_replace(target: dict, texts: list[str] or dict):
8+
def cursorless_replace(target: dict, texts: list[str]):
99
"""Replace targets with texts"""
1010
actions.user.cursorless_single_target_command("replace", target, texts)

0 commit comments

Comments
 (0)