-
-
Notifications
You must be signed in to change notification settings - Fork 93
add generator expressions to matcher for python argumentOrParameter #633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pokey
merged 15 commits into
cursorless-dev:main
from
AndrewDant:feature/generator_expression
Apr 26, 2022
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f9a6a29
add generator expressions to matcher for python argumentOrParameter
AndrewDant 6e57dba
fix: update python matcher for generator expressions in calls
AndrewDant 20f5e51
add multiple test cases with generator expression arguments
AndrewDant 99174f8
reformat updated python matcher with prettier
AndrewDant ccd15b6
refactor python argument finder
AndrewDant d2bbb79
add chuck every tests with generator expression argument
AndrewDant 7adda0f
Merge branch 'main' into feature/generator_expression
AndrewDant 53e22f4
removed an unused import
AndrewDant fa6c6b4
Merge remote-tracking branch 'AndrewDant/feature/generator_expression…
AndrewDant b464d60
Merge branch 'main' into feature/generator_expression
pokey 47971b6
Merge branch 'main' into feature/generator_expression
pokey 1c0afbf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0ad6e9c
Merge branch 'main' into feature/generator_expression
AndrewDant 60ef4b3
re-recorded chuck every arg generator expression tests
AndrewDant 33be72d
Merge branch 'main' into feature/generator_expression
pokey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/test/suite/fixtures/recorded/languages/python/chuckArgDrum.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| languageId: python | ||
| command: | ||
| version: 1 | ||
| spokenForm: chuck arg drum | ||
| action: remove | ||
| targets: | ||
| - type: primitive | ||
| modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false} | ||
| mark: {type: decoratedSymbol, symbolColor: default, character: d} | ||
| initialState: | ||
| documentContents: "\" \".join((word for word in word_list), (word for word in word_list))" | ||
| selections: | ||
| - anchor: {line: 0, character: 39} | ||
| active: {line: 0, character: 67} | ||
| marks: | ||
| default.d: | ||
| start: {line: 0, character: 19} | ||
| end: {line: 0, character: 23} | ||
| finalState: | ||
| documentContents: "\" \".join((word for word in word_list))" | ||
| selections: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 37} | ||
| thatMark: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 9} | ||
| fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: d}, selectionType: token, position: contents, insideOutsideType: outside, modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false}, isImplicit: false}] |
27 changes: 27 additions & 0 deletions
27
src/test/suite/fixtures/recorded/languages/python/chuckArgFine.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| languageId: python | ||
| command: | ||
| version: 1 | ||
| spokenForm: chuck arg fine | ||
| action: remove | ||
| targets: | ||
| - type: primitive | ||
| modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false} | ||
| mark: {type: decoratedSymbol, symbolColor: default, character: f} | ||
| initialState: | ||
| documentContents: "\" \".join((word for word in word_list), \"words\")" | ||
| selections: | ||
| - anchor: {line: 0, character: 47} | ||
| active: {line: 0, character: 47} | ||
| marks: | ||
| default.f: | ||
| start: {line: 0, character: 15} | ||
| end: {line: 0, character: 18} | ||
| finalState: | ||
| documentContents: "\" \".join(\"words\")" | ||
| selections: | ||
| - anchor: {line: 0, character: 17} | ||
| active: {line: 0, character: 17} | ||
| thatMark: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 9} | ||
| fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: f}, selectionType: token, position: contents, insideOutsideType: outside, modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false}, isImplicit: false}] |
27 changes: 27 additions & 0 deletions
27
src/test/suite/fixtures/recorded/languages/python/chuckArgWhale.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| languageId: python | ||
| command: | ||
| version: 1 | ||
| spokenForm: chuck arg whale | ||
| action: remove | ||
| targets: | ||
| - type: primitive | ||
| modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false} | ||
| mark: {type: decoratedSymbol, symbolColor: default, character: w} | ||
| initialState: | ||
| documentContents: "\" \".join(word for word in word_list)" | ||
| selections: | ||
| - anchor: {line: 0, character: 36} | ||
| active: {line: 0, character: 36} | ||
| marks: | ||
| default.w: | ||
| start: {line: 0, character: 18} | ||
| end: {line: 0, character: 22} | ||
| finalState: | ||
| documentContents: "\" \".join()" | ||
| selections: | ||
| - anchor: {line: 0, character: 10} | ||
| active: {line: 0, character: 10} | ||
| thatMark: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 9} | ||
| fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: w}, selectionType: token, position: contents, insideOutsideType: outside, modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false}, isImplicit: false}] |
27 changes: 27 additions & 0 deletions
27
src/test/suite/fixtures/recorded/languages/python/chuckEveryArgAir.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| languageId: python | ||
| command: | ||
| version: 1 | ||
| spokenForm: chuck every arg air | ||
| action: remove | ||
| targets: | ||
| - type: primitive | ||
| modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: true} | ||
| mark: {type: decoratedSymbol, symbolColor: default, character: a} | ||
| initialState: | ||
| documentContents: "\" \".join((word for word in word_list), (name for name in name_list))" | ||
| selections: | ||
| - anchor: {line: 0, character: 68} | ||
| active: {line: 0, character: 68} | ||
| marks: | ||
| default.a: | ||
| start: {line: 0, character: 40} | ||
| end: {line: 0, character: 44} | ||
| finalState: | ||
| documentContents: "\" \".join()" | ||
| selections: | ||
| - anchor: {line: 0, character: 10} | ||
| active: {line: 0, character: 10} | ||
| thatMark: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 9} | ||
| fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: a}, selectionType: token, position: contents, insideOutsideType: outside, modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: true}, isImplicit: false}] |
27 changes: 27 additions & 0 deletions
27
src/test/suite/fixtures/recorded/languages/python/chuckEveryArgRed.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| languageId: python | ||
| command: | ||
| version: 1 | ||
| spokenForm: chuck every arg red | ||
| action: remove | ||
| targets: | ||
| - type: primitive | ||
| modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: true} | ||
| mark: {type: decoratedSymbol, symbolColor: default, character: r} | ||
| initialState: | ||
| documentContents: "\" \".join(word for word in word_list)" | ||
AndrewDant marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| selections: | ||
| - anchor: {line: 0, character: 36} | ||
| active: {line: 0, character: 36} | ||
| marks: | ||
| default.r: | ||
| start: {line: 0, character: 9} | ||
| end: {line: 0, character: 13} | ||
| finalState: | ||
| documentContents: "\" \".join()" | ||
| selections: | ||
| - anchor: {line: 0, character: 10} | ||
| active: {line: 0, character: 10} | ||
| thatMark: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 9} | ||
| fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: r}, selectionType: token, position: contents, insideOutsideType: outside, modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: true}, isImplicit: false}] | ||
27 changes: 27 additions & 0 deletions
27
src/test/suite/fixtures/recorded/languages/python/chuckEveryArgSit.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| languageId: python | ||
| command: | ||
| version: 1 | ||
| spokenForm: chuck every arg sit | ||
| action: remove | ||
| targets: | ||
| - type: primitive | ||
| modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: true} | ||
| mark: {type: decoratedSymbol, symbolColor: default, character: i} | ||
| initialState: | ||
| documentContents: "\" \".join((word for word in word_list), another_argument)" | ||
| selections: | ||
| - anchor: {line: 0, character: 56} | ||
| active: {line: 0, character: 56} | ||
| marks: | ||
| default.i: | ||
| start: {line: 0, character: 24} | ||
| end: {line: 0, character: 26} | ||
| finalState: | ||
| documentContents: "\" \".join()" | ||
| selections: | ||
| - anchor: {line: 0, character: 10} | ||
| active: {line: 0, character: 10} | ||
| thatMark: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 9} | ||
| fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: i}, selectionType: token, position: contents, insideOutsideType: outside, modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: true}, isImplicit: false}] |
27 changes: 27 additions & 0 deletions
27
src/test/suite/fixtures/recorded/languages/python/takeArgDrum.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| languageId: python | ||
| command: | ||
| version: 1 | ||
| spokenForm: take arg drum | ||
| action: setSelection | ||
| targets: | ||
| - type: primitive | ||
| modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false} | ||
| mark: {type: decoratedSymbol, symbolColor: default, character: d} | ||
| initialState: | ||
| documentContents: "\" \".join((word for word in word_list), \"words\")" | ||
| selections: | ||
| - anchor: {line: 0, character: 47} | ||
| active: {line: 0, character: 47} | ||
| marks: | ||
| default.d: | ||
| start: {line: 0, character: 19} | ||
| end: {line: 0, character: 23} | ||
| finalState: | ||
| documentContents: "\" \".join((word for word in word_list), \"words\")" | ||
| selections: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 37} | ||
| thatMark: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 37} | ||
| fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: d}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false}, isImplicit: false}] |
27 changes: 27 additions & 0 deletions
27
src/test/suite/fixtures/recorded/languages/python/takeArgRed.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| languageId: python | ||
| command: | ||
| version: 1 | ||
| spokenForm: take arg red | ||
| action: setSelection | ||
| targets: | ||
| - type: primitive | ||
| modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false} | ||
| mark: {type: decoratedSymbol, symbolColor: default, character: r} | ||
| initialState: | ||
| documentContents: "\" \".join(word for word in word_list)" | ||
| selections: | ||
| - anchor: {line: 0, character: 36} | ||
| active: {line: 0, character: 36} | ||
| marks: | ||
| default.r: | ||
| start: {line: 0, character: 9} | ||
| end: {line: 0, character: 13} | ||
| finalState: | ||
| documentContents: "\" \".join(word for word in word_list)" | ||
| selections: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 35} | ||
| thatMark: | ||
| - anchor: {line: 0, character: 9} | ||
| active: {line: 0, character: 35} | ||
| fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: r}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false}, isImplicit: false}] |
27 changes: 27 additions & 0 deletions
27
src/test/suite/fixtures/recorded/languages/python/takeArgWhale.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| languageId: python | ||
| command: | ||
| version: 1 | ||
| spokenForm: take arg whale | ||
| action: setSelection | ||
| targets: | ||
| - type: primitive | ||
| modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false} | ||
| mark: {type: decoratedSymbol, symbolColor: default, character: w} | ||
| initialState: | ||
| documentContents: "\" \".join((word for word in word_list), (word for word in word_list))" | ||
| selections: | ||
| - anchor: {line: 0, character: 68} | ||
| active: {line: 0, character: 68} | ||
| marks: | ||
| default.w: | ||
| start: {line: 0, character: 49} | ||
| end: {line: 0, character: 53} | ||
| finalState: | ||
| documentContents: "\" \".join((word for word in word_list), (word for word in word_list))" | ||
| selections: | ||
| - anchor: {line: 0, character: 39} | ||
| active: {line: 0, character: 67} | ||
| thatMark: | ||
| - anchor: {line: 0, character: 39} | ||
| active: {line: 0, character: 67} | ||
| fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: w}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: argumentOrParameter, includeSiblings: false}, isImplicit: false}] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.