Skip to content

Get custom spoken forms from Talon#1940

Merged
pokey merged 14 commits intomainfrom
pokey/get-custom-spoken-forms-from-talon
Oct 30, 2023
Merged

Get custom spoken forms from Talon#1940
pokey merged 14 commits intomainfrom
pokey/get-custom-spoken-forms-from-talon

Conversation

@pokey
Copy link
Member

@pokey pokey commented Oct 12, 2023

Checklist

@pokey pokey mentioned this pull request Oct 12, 2023
1 task
@pokey pokey force-pushed the pokey/write-spokenformsjson-from-talon branch from 2410b74 to 0c3eca4 Compare October 12, 2023 17:41
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch from 9286669 to dad00fb Compare October 12, 2023 17:41
@pokey pokey force-pushed the pokey/write-spokenformsjson-from-talon branch from 0c3eca4 to 91b22f2 Compare October 16, 2023 15:02
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch from c4e7b75 to 6a6d06a Compare October 16, 2023 15:02
@pokey pokey force-pushed the pokey/write-spokenformsjson-from-talon branch from 91b22f2 to b45b136 Compare October 16, 2023 15:29
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch from 88af8bf to 5aefc8b Compare October 16, 2023 15:29
@pokey pokey force-pushed the pokey/write-spokenformsjson-from-talon branch from b45b136 to a39fb93 Compare October 16, 2023 15:47
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch 2 times, most recently from 88d7ec1 to 84d2f1d Compare October 16, 2023 16:17
@pokey pokey force-pushed the pokey/write-spokenformsjson-from-talon branch from 1522908 to aaeb7a8 Compare October 17, 2023 13:55
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch 2 times, most recently from 60a927f to c07368a Compare October 17, 2023 14:11
@pokey pokey force-pushed the pokey/write-spokenformsjson-from-talon branch 2 times, most recently from 74240bc to 129b71e Compare October 18, 2023 15:06
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch 2 times, most recently from 2e509b7 to 983ebe2 Compare October 18, 2023 15:08
@pokey pokey force-pushed the pokey/write-spokenformsjson-from-talon branch from 129b71e to 474772a Compare October 18, 2023 15:08
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch from 983ebe2 to 516045d Compare October 18, 2023 15:17
@pokey pokey force-pushed the pokey/write-spokenformsjson-from-talon branch from 474772a to 0542218 Compare October 18, 2023 15:17
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch from 516045d to e71eb95 Compare October 18, 2023 15:57
@pokey pokey force-pushed the pokey/write-spokenformsjson-from-talon branch from 3b87860 to 3d8e394 Compare October 20, 2023 12:45
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch from e71eb95 to 3abd5af Compare October 20, 2023 12:45
@pokey pokey changed the base branch from pokey/write-spokenformsjson-from-talon to base/pokey/get-custom-spoken-forms-from-talon October 20, 2023 12:50
@pokey pokey mentioned this pull request Oct 20, 2023
2 tasks
@pokey pokey force-pushed the base/pokey/get-custom-spoken-forms-from-talon branch from 3d8e394 to 97cc750 Compare October 20, 2023 13:00
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch from 3abd5af to 896bbe4 Compare October 20, 2023 13:00
@pokey pokey force-pushed the base/pokey/get-custom-spoken-forms-from-talon branch from 97cc750 to f3920b5 Compare October 20, 2023 13:07
@pokey pokey force-pushed the pokey/get-custom-spoken-forms-from-talon branch from 896bbe4 to c9f226b Compare October 20, 2023 13:07
Comment on lines +56 to +57
} catch (err) {
if ((err as any)?.code === "ENOENT") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could type annotate the catch instead:

Suggested change
} catch (err) {
if ((err as any)?.code === "ENOENT") {
} catch (err: any) {
if (err?.code === "ENOENT") {

but the idiomatic thing would be to do an instanceof check

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c1bd390 contains an alternative approach, courtesy of chatgpt. wdyt?

@pokey
Copy link
Member Author

pokey commented Oct 26, 2023

ok @AndreasArvidsson all feedback addressed; this one is ready for review again. I managed to get down to 2 type assertions, and they're more reasonable ones. Factoring it out into a function and using a for loop did simplify things 👍

@pokey pokey mentioned this pull request Oct 27, 2023
26 tasks
@pokey pokey added this pull request to the merge queue Oct 30, 2023
github-merge-queue bot pushed a commit that referenced this pull request Oct 30, 2023
- This PR is the Talon side of #1940

## Checklist

- [-] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
(will do in follow-up)
- [-] 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)
- [x] I have not broken the cheatsheet
- [x] have the json have its own version number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants