Skip to content

Commit 1633e9e

Browse files
More tests
1 parent 5a09eb0 commit 1633e9e

File tree

4 files changed

+26
-14
lines changed

4 files changed

+26
-14
lines changed
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
class Foo:
22
def bar():
33
pass
4-
54
---
65

7-
[#1 Range] = 1:4-2:12
8-
>----------
9-
1| def bar():
10-
2| pass
11-
------------<
12-
6+
[#1 Range] =
137
[#1 Domain] = 0:0-2:12
148
>----------
159
0| class Foo:
@@ -19,10 +13,8 @@ class Foo:
1913

2014

2115
[#2 Range] =
22-
[#2 Domain] = 0:0-3:0
23-
>----------
24-
0| class Foo:
16+
[#2 Domain] = 1:4-2:12
17+
>----------
2518
1| def bar():
2619
2| pass
27-
3|
28-
<
20+
------------<
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class Foo:
2+
def bar():
3+
pass
4+
---
5+
6+
[#1 Range] =
7+
[#1 Domain] = 0:0-2:12
8+
>----------
9+
0| class Foo:
10+
1| def bar():
11+
2| pass
12+
------------<
13+
14+
15+
[#2 Range] =
16+
[#2 Domain] = 1:4-2:12
17+
>----------
18+
1| def bar():
19+
2| pass
20+
------------<

packages/common/src/scopeSupportFacets/python.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
5353
"namedFunction.constructor": supported,
5454
"namedFunction.iteration.document": supported,
5555
"namedFunction.method": supported,
56+
"namedFunction.method.iteration.class": supported,
5657

5758
functionName: supported,
5859
"functionName.constructor": supported,
@@ -154,7 +155,6 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
154155
"interior.element": notApplicable,
155156
"key.attribute": notApplicable,
156157
"key.mapPair.iteration": notApplicable,
157-
"namedFunction.method.iteration.class": notApplicable,
158158
"section.iteration.document": notApplicable,
159159
"section.iteration.parent": notApplicable,
160160
"textFragment.comment.block": notApplicable,

queries/python.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@
326326

327327
(class_definition
328328
body: (_) @namedFunction.iteration @functionName.iteration
329-
) @namedFunction.iteration.domain @functionName.iteration.domain
329+
)
330330

331331
;;!! def foo():
332332
;;!! a = 0

0 commit comments

Comments
 (0)