Skip to content

Commit

Permalink
Merge branch 'main' into snippetVariants
Browse files Browse the repository at this point in the history
  • Loading branch information
phillco authored Feb 4, 2025
2 parents 372ff5d + 0c94137 commit a12fe77
Show file tree
Hide file tree
Showing 24 changed files with 453 additions and 44 deletions.
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Thanks for your change!
* Remember to *test the cheatsheet manually* if you've added a new action,
modifier, or scope -- or changed any Talon files.
-->
Remove this comment.
-->


## Release notes
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
with:
fetch-depth: 0

# FIXME: https://github.com/cursorless-dev/cursorless/issues/2817
- name: Upgrade Corepack
run: npm install --global corepack@0.31.0

- name: Enable Corepack
run: corepack enable

Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/pr-description.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PR Description

on:
pull_request:
types: [opened, edited, reopened, synchronize]
merge_group:
branches: [main]

jobs:
validate-pr-description:
runs-on: ubuntu-latest
steps:
- name: Set up workspace
uses: actions/checkout@v2

- name: Validate description
run: |
# Fetch PR description from env with jq
PR_DESCRIPTION=$(jq -r ".pull_request.body" "$GITHUB_EVENT_PATH")
KEYWORD="REQUIRED_KEYWORD"
# Ensure PR author removed the welcome comment
if [[ $PR_DESCRIPTION = *"<!--"* ]] || [[ $PR_DESCRIPTION = *"-->"* ]]; then
echo "FAILED: Please remove the welcome comment from your PR description."
exit 1
else
echo "OK: Welcome comment is removed your PR description."
fi
echo "PASS: All checks OK!"
4 changes: 4 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
with:
python-version: 3.x

# FIXME: https://github.com/cursorless-dev/cursorless/issues/2817
- name: Upgrade Corepack
run: npm install --global corepack@0.31.0

- name: Enable Corepack
run: corepack enable

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# FIXME: https://github.com/cursorless-dev/cursorless/issues/2817
- name: Upgrade Corepack
run: npm install --global corepack@0.31.0

- name: Enable Corepack
run: corepack enable

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# FIXME: https://github.com/cursorless-dev/cursorless/issues/2817
- name: Upgrade Corepack
run: npm install --global --force corepack@0.31.0

- name: Enable Corepack
run: corepack enable

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ next-env.d.ts

# test subset config
packages/test-harness/testSubsetGrep.properties
packages/test-harness/failedTests.properties


# cursorless-neovim
cursorless.nvim/node/cursorless-neovim
Expand Down
4 changes: 4 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"request": "launch",
"env": {
"CURSORLESS_MODE": "test",
"CURSORLESS_LOG_FAILED": "true",
"CURSORLESS_REPO_ROOT": "${workspaceFolder}"
},
"args": [
Expand All @@ -52,6 +53,7 @@
"env": {
"CURSORLESS_MODE": "test",
"CURSORLESS_RUN_TEST_SUBSET": "true",
"CURSORLESS_LOG_FAILED": "true",
"CURSORLESS_REPO_ROOT": "${workspaceFolder}"
},
"args": [
Expand Down Expand Up @@ -136,6 +138,7 @@
"program": "${workspaceFolder}/packages/test-harness/dist/runTalonTests.cjs",
"env": {
"CURSORLESS_MODE": "test",
"CURSORLESS_LOG_FAILED": "true",
"CURSORLESS_REPO_ROOT": "${workspaceFolder}"
},
"outFiles": ["${workspaceFolder}/**/out/**/*.js"],
Expand Down Expand Up @@ -171,6 +174,7 @@
"program": "${workspaceFolder}/packages/test-harness/dist/runTalonJsTests.cjs",
"env": {
"CURSORLESS_MODE": "test",
"CURSORLESS_LOG_FAILED": "true",
"CURSORLESS_REPO_ROOT": "${workspaceFolder}"
},
"outFiles": ["${workspaceFolder}/**/out/**/*.js"],
Expand Down
File renamed without changes.
48 changes: 48 additions & 0 deletions data/fixtures/scopes/python/interior.if.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
if True:
a
elif False:
b
else:
c
---

[#1 Content] =
[#1 Removal] = 1:4-1:5
>-<
1| a

[#1 Domain] = 0:0-1:5
>--------
0| if True:
1| a
-----<

[#1 Insertion delimiter] = " "


[#2 Content] =
[#2 Removal] = 3:4-3:5
>-<
3| b

[#2 Domain] = 2:0-3:5
>-----------
2| elif False:
3| b
-----<

[#2 Insertion delimiter] = " "


[#3 Content] =
[#3 Removal] = 5:4-5:5
>-<
5| c

[#3 Domain] = 4:0-5:5
>-----
4| else:
5| c
-----<

[#3 Insertion delimiter] = " "
16 changes: 16 additions & 0 deletions data/fixtures/scopes/python/interior.loop.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
for v in values:
pass
---

[Content] =
[Removal] = 1:4-1:8
>----<
1| pass

[Domain] = 0:0-1:8
>----------------
0| for v in values:
1| pass
--------<

[Insertion delimiter] = " "
16 changes: 16 additions & 0 deletions data/fixtures/scopes/python/interior.loop2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
while True:
pass
---

[Content] =
[Removal] = 1:4-1:8
>----<
1| pass

[Domain] = 0:0-1:8
>-----------
0| while True:
1| pass
--------<

[Insertion delimiter] = " "
62 changes: 62 additions & 0 deletions data/fixtures/scopes/python/interior.switchCase.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
match value:
case 1:
a
case _:
b
---

[#1 Content] = 1:4-4:9
>-------
1| case 1:
2| a
3| case _:
4| b
---------<

[#1 Removal] = 0:12-4:9
>
0| match value:
1| case 1:
2| a
3| case _:
4| b
---------<

[#1 Domain] = 0:0-4:9
>------------
0| match value:
1| case 1:
2| a
3| case _:
4| b
---------<

[#1 Insertion delimiter] = " "


[#2 Content] =
[#2 Removal] = 2:8-2:9
>-<
2| a

[#2 Domain] = 1:4-2:9
>-------
1| case 1:
2| a
---------<

[#2 Insertion delimiter] = " "


[#3 Content] =
[#3 Removal] = 4:8-4:9
>-<
4| b

[#3 Domain] = 3:4-4:9
>-------
3| case _:
4| b
---------<

[#3 Insertion delimiter] = " "
34 changes: 34 additions & 0 deletions data/fixtures/scopes/python/interior.ternary.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
1 if True else 0
---

[#1 Content] =
[#1 Removal] =
[#1 Domain] = 0:0-0:1
>-<
0| 1 if True else 0

[#1 Insertion delimiter] = " "


[#2 Content] =
[#2 Removal] = 0:5-0:9
>----<
0| 1 if True else 0

[#2 Domain] = 0:2-0:9
>-------<
0| 1 if True else 0

[#2 Insertion delimiter] = " "


[#3 Content] =
[#3 Removal] = 0:15-0:16
>-<
0| 1 if True else 0

[#3 Domain] = 0:10-0:16
>------<
0| 1 if True else 0

[#3 Insertion delimiter] = " "
48 changes: 48 additions & 0 deletions data/fixtures/scopes/python/interior.try.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
try:
a
except:
b
finally:
c
---

[#1 Content] =
[#1 Removal] = 1:4-1:5
>-<
1| a

[#1 Domain] = 0:0-1:5
>----
0| try:
1| a
-----<

[#1 Insertion delimiter] = " "


[#2 Content] =
[#2 Removal] = 3:4-3:5
>-<
3| b

[#2 Domain] = 2:0-3:5
>-------
2| except:
3| b
-----<

[#2 Insertion delimiter] = " "


[#3 Content] =
[#3 Removal] = 5:4-5:5
>-<
5| c

[#3 Domain] = 4:0-5:5
>--------
4| finally:
5| c
-----<

[#3 Insertion delimiter] = " "
32 changes: 32 additions & 0 deletions data/fixtures/scopes/python/interior.try2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
try:
a
except*:
b
---

[#1 Content] =
[#1 Removal] = 1:4-1:5
>-<
1| a

[#1 Domain] = 0:0-1:5
>----
0| try:
1| a
-----<

[#1 Insertion delimiter] = " "


[#2 Content] =
[#2 Removal] = 3:4-3:5
>-<
3| b

[#2 Domain] = 2:0-3:5
>--------
2| except*:
3| b
-----<

[#2 Insertion delimiter] = " "
Loading

0 comments on commit a12fe77

Please sign in to comment.