Skip to content

Added missing python scope facets #2924

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
merged 6 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions data/fixtures/scopes/python/class2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@value
class MyClass:
pass
---

[Content] =
[Removal] =
[Domain] = 0:0-2:8
>------
0| @value
1| class MyClass:
2| pass
--------<

[Insertion delimiter] = "\n\n"
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class MyClass:
def __init__(self, a: int):
pass
---

[#1 Range] =
[#1 Domain] = 1:4-2:12
>---------------------------
1| def __init__(self, a: int):
2| pass
------------<


[#2 Range] =
[#2 Domain] = 1:17-1:29
>------------<
1| def __init__(self, a: int):


[#3 Range] =
[#3 Domain] = 2:8-2:12
>----<
2| pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class MyClass:
def __init__(self, a: int):
pass
---

[#1 Content] =
[#1 Removal] =
[#1 Domain] = 0:0-2:12
>--------------
0| class MyClass:
1| def __init__(self, a: int):
2| pass
------------<

[#1 Insertion delimiter] = " "


[#2 Content] = 1:26-1:29
>---<
1| def __init__(self, a: int):

[#2 Removal] = 1:24-1:29
>-----<
1| def __init__(self, a: int):

[#2 Leading delimiter] = 1:24-1:26
>--<
1| def __init__(self, a: int):

[#2 Domain] = 1:23-1:29
>------<
1| def __init__(self, a: int):

[#2 Insertion delimiter] = " "
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
def funk(a: int):
pass
---

[#1 Range] =
[#1 Domain] = 0:9-0:15
>------<
0| def funk(a: int):


[#2 Range] =
[#2 Domain] = 1:4-1:8
>----<
1| pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class MyClass:
def funk(a: int):
pass
---

[#1 Range] =
[#1 Domain] = 1:4-2:12
>-----------------
1| def funk(a: int):
2| pass
------------<


[#2 Range] =
[#2 Domain] = 1:13-1:19
>------<
1| def funk(a: int):


[#3 Range] =
[#3 Domain] = 2:8-2:12
>----<
2| pass
34 changes: 34 additions & 0 deletions data/fixtures/scopes/python/type.argument.formal.method.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class MyClass:
def funk(a: int):
pass
---

[#1 Content] =
[#1 Removal] =
[#1 Domain] = 0:0-2:12
>--------------
0| class MyClass:
1| def funk(a: int):
2| pass
------------<

[#1 Insertion delimiter] = " "


[#2 Content] = 1:16-1:19
>---<
1| def funk(a: int):

[#2 Removal] = 1:14-1:19
>-----<
1| def funk(a: int):

[#2 Leading delimiter] = 1:14-1:16
>--<
1| def funk(a: int):

[#2 Domain] = 1:13-1:19
>------<
1| def funk(a: int):

[#2 Insertion delimiter] = " "
21 changes: 21 additions & 0 deletions data/fixtures/scopes/python/type.argument.formal.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
def funk(a: int):
pass
---

[Content] = 0:12-0:15
>---<
0| def funk(a: int):

[Removal] = 0:10-0:15
>-----<
0| def funk(a: int):

[Leading delimiter] = 0:10-0:12
>--<
0| def funk(a: int):

[Domain] = 0:9-0:15
>------<
0| def funk(a: int):

[Insertion delimiter] = " "
13 changes: 13 additions & 0 deletions data/fixtures/scopes/python/type.class.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class MyClass:
pass
---

[Content] =
[Removal] =
[Domain] = 0:0-1:8
>--------------
0| class MyClass:
1| pass
--------<

[Insertion delimiter] = " "
15 changes: 15 additions & 0 deletions data/fixtures/scopes/python/type.class2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@value
class MyClass:
pass
---

[Content] =
[Removal] =
[Domain] = 0:0-2:8
>------
0| @value
1| class MyClass:
2| pass
--------<

[Insertion delimiter] = " "
8 changes: 8 additions & 0 deletions data/fixtures/scopes/python/type.field.iteration.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class MyClass:
a: int
---

[Range] =
[Domain] = 1:4-1:10
>------<
1| a: int
32 changes: 32 additions & 0 deletions data/fixtures/scopes/python/type.field.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
class MyClass:
a: int
---

[#1 Content] =
[#1 Removal] =
[#1 Domain] = 0:0-1:10
>--------------
0| class MyClass:
1| a: int
----------<

[#1 Insertion delimiter] = " "


[#2 Content] = 1:7-1:10
>---<
1| a: int

[#2 Removal] = 1:5-1:10
>-----<
1| a: int

[#2 Leading delimiter] = 1:5-1:7
>--<
1| a: int

[#2 Domain] = 1:4-1:10
>------<
1| a: int

[#2 Insertion delimiter] = " "
23 changes: 23 additions & 0 deletions data/fixtures/scopes/python/type.return.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
def funk() -> int:
pass
---

[Content] = 0:14-0:17
>---<
0| def funk() -> int:

[Removal] = 0:10-0:17
>-------<
0| def funk() -> int:

[Leading delimiter] = 0:10-0:14
>----<
0| def funk() -> int:

[Domain] = 0:0-1:8
>------------------
0| def funk() -> int:
1| pass
--------<

[Insertion delimiter] = " "
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
value: map[str, int]
---

[Range] =
[Domain] = 0:11-0:19
>--------<
0| value: map[str, int]
29 changes: 29 additions & 0 deletions data/fixtures/scopes/python/type.typeArgument.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
value: list[int]
---

[#1 Content] = 0:7-0:16
>---------<
0| value: list[int]

[#1 Removal] = 0:5-0:16
>-----------<
0| value: list[int]

[#1 Leading delimiter] = 0:5-0:7
>--<
0| value: list[int]

[#1 Domain] = 0:0-0:16
>----------------<
0| value: list[int]

[#1 Insertion delimiter] = " "


[#2 Content] =
[#2 Removal] =
[#2 Domain] = 0:12-0:15
>---<
0| value: list[int]

[#2 Insertion delimiter] = ", "
52 changes: 52 additions & 0 deletions data/fixtures/scopes/python/type.typeArgument2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
value: map[str, int]
---

[#1 Content] = 0:7-0:20
>-------------<
0| value: map[str, int]

[#1 Removal] = 0:5-0:20
>---------------<
0| value: map[str, int]

[#1 Leading delimiter] = 0:5-0:7
>--<
0| value: map[str, int]

[#1 Domain] = 0:0-0:20
>--------------------<
0| value: map[str, int]

[#1 Insertion delimiter] = " "


[#2 Content] =
[#2 Domain] = 0:11-0:14
>---<
0| value: map[str, int]

[#2 Removal] = 0:11-0:16
>-----<
0| value: map[str, int]

[#2 Trailing delimiter] = 0:14-0:16
>--<
0| value: map[str, int]

[#2 Insertion delimiter] = ", "


[#3 Content] =
[#3 Domain] = 0:16-0:19
>---<
0| value: map[str, int]

[#3 Removal] = 0:14-0:19
>-----<
0| value: map[str, int]

[#3 Leading delimiter] = 0:14-0:16
>--<
0| value: map[str, int]

[#3 Insertion delimiter] = ", "
20 changes: 20 additions & 0 deletions data/fixtures/scopes/python/type.variable.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
value: int
---

[Content] = 0:7-0:10
>---<
0| value: int

[Removal] = 0:5-0:10
>-----<
0| value: int

[Leading delimiter] = 0:5-0:7
>--<
0| value: int

[Domain] = 0:0-0:10
>----------<
0| value: int

[Insertion delimiter] = " "
20 changes: 20 additions & 0 deletions data/fixtures/scopes/python/type.variable2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
value: int = 0
---

[Content] = 0:7-0:10
>---<
0| value: int = 0

[Removal] = 0:5-0:10
>-----<
0| value: int = 0

[Leading delimiter] = 0:5-0:7
>--<
0| value: int = 0

[Domain] = 0:0-0:14
>--------------<
0| value: int = 0

[Insertion delimiter] = " "
Loading
Loading