From c12e7769b71a0081dc3a22c9ac826edf504f8dbc Mon Sep 17 00:00:00 2001 From: Pokey Rule <755842+pokey@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:55:15 +0000 Subject: [PATCH] improve consistency --- .../scopes/python/name.resource2.scope | 24 +++++++++++++++---- queries/python.scm | 3 ++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/packages/cursorless-vscode-e2e/src/suite/fixtures/scopes/python/name.resource2.scope b/packages/cursorless-vscode-e2e/src/suite/fixtures/scopes/python/name.resource2.scope index b74a93c5ba..814fedcfa4 100644 --- a/packages/cursorless-vscode-e2e/src/suite/fixtures/scopes/python/name.resource2.scope +++ b/packages/cursorless-vscode-e2e/src/suite/fixtures/scopes/python/name.resource2.scope @@ -2,26 +2,40 @@ with aaa, bbb as ccc: pass --- -[#1 Content] = 0:17-0:20 +[#1.1 Content] = 0:5-0:8 +0| with aaa, bbb as ccc: + >---< + +[#1.1 Removal] = 0:5-0:10 +0| with aaa, bbb as ccc: + >-----< + +[#1.1 Trailing delimiter] = 0:8-0:10 +0| with aaa, bbb as ccc: + >--< + +[#1.1 Insertion delimiter] = " " + +[#1.2 Content] = 0:17-0:20 0| with aaa, bbb as ccc: >---< -[#1 Removal] = 0:13-0:20 +[#1.2 Removal] = 0:13-0:20 0| with aaa, bbb as ccc: >-------< -[#1 Leading delimiter] = 0:13-0:17 +[#1.2 Leading delimiter] = 0:13-0:17 0| with aaa, bbb as ccc: >----< +[#1.2 Insertion delimiter] = " " + [#1 Domain] = 0:0-1:8 0| with aaa, bbb as ccc: >--------------------- 1| pass --------< -[#1 Insertion delimiter] = " " - [#2 Content] = [#2 Domain] = 0:5-0:8 diff --git a/queries/python.scm b/queries/python.scm index 06b1692d64..1f465abea9 100644 --- a/queries/python.scm +++ b/queries/python.scm @@ -151,7 +151,7 @@ (with_item)? @_.leading.endOf . (with_item - value: (_) @value + value: (_) @value @name ) . (with_item)? @_.trailing.startOf @@ -159,6 +159,7 @@ ) @_.domain (#not-type? @value "as_pattern") (#allow-multiple! @value) + (#allow-multiple! @name) ) ;;!! with aaa: