Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit c3fc405

Browse files
lars-reimannGideonKoenig
authored and
GideonKoenig
committed
test: data for unused and constant annotations (#439)
* test: api data for unused annotations * test: usage data for unused annotations * test: api data for constant annotations * test: usage data for constant annotations * refactor: rename files to prevent mapping to incorrect schema
1 parent 514555d commit c3fc405

File tree

4 files changed

+569
-0
lines changed

4 files changed

+569
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"distribution": "test",
3+
"package": "test",
4+
"version": "0.0.1",
5+
"modules": [
6+
{
7+
"name": "test",
8+
"imports": [],
9+
"from_imports": [],
10+
"classes": [],
11+
"functions": [
12+
"test.unused_global_function",
13+
"test.commonly_used_global_function"
14+
]
15+
}
16+
],
17+
"classes": [],
18+
"functions": [
19+
{
20+
"name": "unused_global_function",
21+
"unique_name": "unused_global_function",
22+
"qname": "test.unused_global_function",
23+
"unique_qname": "test.unused_global_function",
24+
"decorators": [],
25+
"parameters": [
26+
{
27+
"name": "unused_required_parameter",
28+
"default_value": null,
29+
"is_public": true,
30+
"assigned_by": "POSITION_OR_NAME",
31+
"docstring": {
32+
"type": "str",
33+
"description": ""
34+
}
35+
},
36+
{
37+
"name": "unused_optional_parameter",
38+
"default_value": "'bla'",
39+
"is_public": true,
40+
"assigned_by": "POSITION_OR_NAME",
41+
"docstring": {
42+
"type": "str",
43+
"description": ""
44+
}
45+
}
46+
],
47+
"results": [],
48+
"is_public": true,
49+
"description": "",
50+
"docstring": "",
51+
"source_code": ""
52+
},
53+
{
54+
"name": "commonly_used_global_function",
55+
"unique_name": "commonly_used_global_function",
56+
"qname": "test.commonly_used_global_function",
57+
"unique_qname": "test.commonly_used_global_function",
58+
"decorators": [],
59+
"parameters": [
60+
{
61+
"name": "useless_required_parameter",
62+
"default_value": null,
63+
"is_public": true,
64+
"assigned_by": "POSITION_OR_NAME",
65+
"docstring": {
66+
"type": "str",
67+
"description": ""
68+
}
69+
},
70+
{
71+
"name": "useful_required_parameter",
72+
"default_value": null,
73+
"is_public": true,
74+
"assigned_by": "POSITION_OR_NAME",
75+
"docstring": {
76+
"type": "str",
77+
"description": ""
78+
}
79+
},
80+
{
81+
"name": "unused_optional_parameter",
82+
"default_value": "'bla'",
83+
"is_public": true,
84+
"assigned_by": "POSITION_OR_NAME",
85+
"docstring": {
86+
"type": "str",
87+
"description": ""
88+
}
89+
},
90+
{
91+
"name": "useless_optional_parameter",
92+
"default_value": "'bla'",
93+
"is_public": true,
94+
"assigned_by": "POSITION_OR_NAME",
95+
"docstring": {
96+
"type": "str",
97+
"description": ""
98+
}
99+
},
100+
{
101+
"name": "useful_optional_parameter",
102+
"default_value": "'bla'",
103+
"is_public": true,
104+
"assigned_by": "POSITION_OR_NAME",
105+
"docstring": {
106+
"type": "str",
107+
"description": ""
108+
}
109+
}
110+
],
111+
"results": [],
112+
"is_public": true,
113+
"description": "",
114+
"docstring": "",
115+
"source_code": ""
116+
}
117+
]
118+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
{
2+
"class_usages": {},
3+
"function_usages": {
4+
"test.unused_global_function": [],
5+
"test.commonly_used_global_function": [
6+
{
7+
"file": "test.py",
8+
"line": 1,
9+
"column": 1
10+
},
11+
{
12+
"file": "test.py",
13+
"line": 1,
14+
"column": 1
15+
},
16+
{
17+
"file": "test.py",
18+
"line": 1,
19+
"column": 1
20+
},
21+
{
22+
"file": "test.py",
23+
"line": 1,
24+
"column": 1
25+
},
26+
{
27+
"file": "test.py",
28+
"line": 1,
29+
"column": 1
30+
}
31+
]
32+
},
33+
"parameter_usages": {
34+
"test.unused_global_function.unused_required_parameter": [],
35+
"test.unused_global_function.unused_optional_parameter": [],
36+
"test.commonly_used_global_function.useless_required_parameter": [
37+
{
38+
"file": "test.py",
39+
"line": 1,
40+
"column": 1
41+
},
42+
{
43+
"file": "test.py",
44+
"line": 1,
45+
"column": 1
46+
},
47+
{
48+
"file": "test.py",
49+
"line": 1,
50+
"column": 1
51+
},
52+
{
53+
"file": "test.py",
54+
"line": 1,
55+
"column": 1
56+
},
57+
{
58+
"file": "test.py",
59+
"line": 1,
60+
"column": 1
61+
}
62+
],
63+
"test.commonly_used_global_function.useful_required_parameter": [
64+
{
65+
"file": "test.py",
66+
"line": 1,
67+
"column": 1
68+
},
69+
{
70+
"file": "test.py",
71+
"line": 1,
72+
"column": 1
73+
},
74+
{
75+
"file": "test.py",
76+
"line": 1,
77+
"column": 1
78+
},
79+
{
80+
"file": "test.py",
81+
"line": 1,
82+
"column": 1
83+
},
84+
{
85+
"file": "test.py",
86+
"line": 1,
87+
"column": 1
88+
}
89+
],
90+
"test.commonly_used_global_function.unused_optional_parameter": [],
91+
"test.commonly_used_global_function.useless_optional_parameter": [
92+
{
93+
"file": "test.py",
94+
"line": 1,
95+
"column": 1
96+
},
97+
{
98+
"file": "test.py",
99+
"line": 1,
100+
"column": 1
101+
}
102+
],
103+
"test.commonly_used_global_function.useful_optional_parameter": [
104+
{
105+
"file": "test.py",
106+
"line": 1,
107+
"column": 1
108+
},
109+
{
110+
"file": "test.py",
111+
"line": 1,
112+
"column": 1
113+
}
114+
]
115+
},
116+
"value_usages": {
117+
"test.unused_global_function.unused_required_parameter": {},
118+
"test.unused_global_function.unused_optional_parameter": {},
119+
"test.commonly_used_global_function.useless_required_parameter": {
120+
"'blup'": [
121+
{
122+
"file": "test.py",
123+
"line": 1,
124+
"column": 1
125+
},
126+
{
127+
"file": "test.py",
128+
"line": 1,
129+
"column": 1
130+
},
131+
{
132+
"file": "test.py",
133+
"line": 1,
134+
"column": 1
135+
},
136+
{
137+
"file": "test.py",
138+
"line": 1,
139+
"column": 1
140+
},
141+
{
142+
"file": "test.py",
143+
"line": 1,
144+
"column": 1
145+
}
146+
]
147+
},
148+
"test.commonly_used_global_function.useful_required_parameter": {
149+
"'bla'": [
150+
{
151+
"file": "test.py",
152+
"line": 1,
153+
"column": 1
154+
},
155+
{
156+
"file": "test.py",
157+
"line": 1,
158+
"column": 1
159+
}
160+
],
161+
"'blup'": [
162+
{
163+
"file": "test.py",
164+
"line": 1,
165+
"column": 1
166+
},
167+
{
168+
"file": "test.py",
169+
"line": 1,
170+
"column": 1
171+
},
172+
{
173+
"file": "test.py",
174+
"line": 1,
175+
"column": 1
176+
}
177+
]
178+
},
179+
"test.commonly_used_global_function.unused_optional_parameter": {},
180+
"test.commonly_used_global_function.useless_optional_parameter": {
181+
"'bla'": [
182+
{
183+
"file": "test.py",
184+
"line": 1,
185+
"column": 1
186+
},
187+
{
188+
"file": "test.py",
189+
"line": 1,
190+
"column": 1
191+
}
192+
]
193+
},
194+
"test.commonly_used_global_function.useful_optional_parameter": {
195+
"'blup'": [
196+
{
197+
"file": "test.py",
198+
"line": 1,
199+
"column": 1
200+
},
201+
{
202+
"file": "test.py",
203+
"line": 1,
204+
"column": 1
205+
}
206+
]
207+
}
208+
}
209+
}

0 commit comments

Comments
 (0)