Skip to content

Commit 1fa7450

Browse files
type argument
1 parent 69a07b3 commit 1fa7450

File tree

9 files changed

+207
-10
lines changed

9 files changed

+207
-10
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
class MyClass:
2+
def __init__(self, a: int):
3+
pass
4+
---
5+
6+
[#1 Range] =
7+
[#1 Domain] = 1:4-2:12
8+
>---------------------------
9+
1| def __init__(self, a: int):
10+
2| pass
11+
------------<
12+
13+
14+
[#2 Range] =
15+
[#2 Domain] = 1:17-1:29
16+
>------------<
17+
1| def __init__(self, a: int):
18+
19+
20+
[#3 Range] =
21+
[#3 Domain] = 2:8-2:12
22+
>----<
23+
2| pass
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
class MyClass:
2+
def __init__(self, a: int):
3+
pass
4+
---
5+
6+
[#1 Content] =
7+
[#1 Removal] =
8+
[#1 Domain] = 0:0-2:12
9+
>--------------
10+
0| class MyClass:
11+
1| def __init__(self, a: int):
12+
2| pass
13+
------------<
14+
15+
[#1 Insertion delimiter] = " "
16+
17+
18+
[#2 Content] = 1:26-1:29
19+
>---<
20+
1| def __init__(self, a: int):
21+
22+
[#2 Removal] = 1:24-1:29
23+
>-----<
24+
1| def __init__(self, a: int):
25+
26+
[#2 Leading delimiter] = 1:24-1:26
27+
>--<
28+
1| def __init__(self, a: int):
29+
30+
[#2 Domain] = 1:23-1:29
31+
>------<
32+
1| def __init__(self, a: int):
33+
34+
[#2 Insertion delimiter] = " "
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
class MyClass:
2+
def funk(a: int):
3+
pass
4+
---
5+
6+
[#1 Range] =
7+
[#1 Domain] = 1:4-2:12
8+
>-----------------
9+
1| def funk(a: int):
10+
2| pass
11+
------------<
12+
13+
14+
[#2 Range] =
15+
[#2 Domain] = 1:13-1:19
16+
>------<
17+
1| def funk(a: int):
18+
19+
20+
[#3 Range] =
21+
[#3 Domain] = 2:8-2:12
22+
>----<
23+
2| pass
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
class MyClass:
2+
def funk(a: int):
3+
pass
4+
---
5+
6+
[#1 Content] =
7+
[#1 Removal] =
8+
[#1 Domain] = 0:0-2:12
9+
>--------------
10+
0| class MyClass:
11+
1| def funk(a: int):
12+
2| pass
13+
------------<
14+
15+
[#1 Insertion delimiter] = " "
16+
17+
18+
[#2 Content] = 1:16-1:19
19+
>---<
20+
1| def funk(a: int):
21+
22+
[#2 Removal] = 1:14-1:19
23+
>-----<
24+
1| def funk(a: int):
25+
26+
[#2 Leading delimiter] = 1:14-1:16
27+
>--<
28+
1| def funk(a: int):
29+
30+
[#2 Domain] = 1:13-1:19
31+
>------<
32+
1| def funk(a: int):
33+
34+
[#2 Insertion delimiter] = " "
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
def funk(a: int):
2+
pass
3+
---
4+
5+
[Content] = 0:12-0:15
6+
>---<
7+
0| def funk(a: int):
8+
9+
[Removal] = 0:10-0:15
10+
>-----<
11+
0| def funk(a: int):
12+
13+
[Leading delimiter] = 0:10-0:12
14+
>--<
15+
0| def funk(a: int):
16+
17+
[Domain] = 0:9-0:15
18+
>------<
19+
0| def funk(a: int):
20+
21+
[Insertion delimiter] = " "
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class MyClass:
2+
a: int
3+
---
4+
5+
[Range] =
6+
[Domain] = 1:4-1:10
7+
>------<
8+
1| a: int
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
class MyClass:
2+
a: int
3+
---
4+
5+
[#1 Content] =
6+
[#1 Removal] =
7+
[#1 Domain] = 0:0-1:10
8+
>--------------
9+
0| class MyClass:
10+
1| a: int
11+
----------<
12+
13+
[#1 Insertion delimiter] = " "
14+
15+
16+
[#2 Content] = 1:7-1:10
17+
>---<
18+
1| a: int
19+
20+
[#2 Removal] = 1:5-1:10
21+
>-----<
22+
1| a: int
23+
24+
[#2 Leading delimiter] = 1:5-1:7
25+
>--<
26+
1| a: int
27+
28+
[#2 Domain] = 1:4-1:10
29+
>------<
30+
1| a: int
31+
32+
[#2 Insertion delimiter] = " "
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
def funk() -> int:
2+
pass
3+
---
4+
5+
[Content] = 0:14-0:17
6+
>---<
7+
0| def funk() -> int:
8+
9+
[Removal] = 0:10-0:17
10+
>-------<
11+
0| def funk() -> int:
12+
13+
[Leading delimiter] = 0:10-0:14
14+
>----<
15+
0| def funk() -> int:
16+
17+
[Domain] = 0:0-1:8
18+
>------------------
19+
0| def funk() -> int:
20+
1| pass
21+
--------<
22+
23+
[Insertion delimiter] = " "

packages/common/src/scopeSupportFacets/python.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
4949
"value.variable.pattern": supported,
5050

5151
"type.class": supported,
52+
"type.argument.formal": supported,
53+
"type.argument.formal.constructor": supported,
54+
"type.argument.formal.constructor.iteration": supported,
55+
"type.argument.formal.iteration": supported,
56+
"type.argument.formal.method": supported,
57+
"type.argument.formal.method.iteration": supported,
58+
"type.return": supported,
59+
"type.field": supported,
60+
"type.field.iteration": supported,
5261

5362
anonymousFunction: supported,
5463
namedFunction: supported,
@@ -183,16 +192,6 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
183192
tags: notApplicable,
184193
"type.alias": notApplicable,
185194

186-
// "type.argument.formal": notApplicable,
187-
// "type.argument.formal.constructor": notApplicable,
188-
// "type.argument.formal.constructor.iteration": notApplicable,
189-
// "type.argument.formal.iteration": notApplicable,
190-
// "type.argument.formal.method": notApplicable,
191-
// "type.argument.formal.method.iteration": notApplicable,
192-
// "type.return": notApplicable,
193-
// "type.field": notApplicable,
194-
// "type.field.iteration": notApplicable,
195-
196195
// "type.cast": notApplicable,
197196
// "type.enum": notApplicable,
198197
// "type.foreach": notApplicable,

0 commit comments

Comments
 (0)