Skip to content

Commit 86e3eb3

Browse files
TylerJang27github-actions[bot]
authored andcommitted
Auto add snapshots
1 parent 704e012 commit 86e3eb3

File tree

2 files changed

+240
-0
lines changed

2 files changed

+240
-0
lines changed
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
// trunk-upgrade-validation:RELEASE
3+
4+
exports[`Testing linter ty test basic 1`] = `
5+
{
6+
"issues": [
7+
{
8+
"code": "unresolved-import",
9+
"column": "1",
10+
"file": "test_data/basic.in.py",
11+
"issueClass": "ISSUE_CLASS_EXISTING",
12+
"level": "LEVEL_HIGH",
13+
"line": "1",
14+
"linter": "ty",
15+
"message": "Module \`typing\` has no member \`Enum\`",
16+
"targetType": "python",
17+
},
18+
{
19+
"code": "revealed-type",
20+
"column": "1",
21+
"file": "test_data/basic.in.py",
22+
"issueClass": "ISSUE_CLASS_EXISTING",
23+
"level": "LEVEL_LOW",
24+
"line": "15",
25+
"linter": "ty",
26+
"message": "Revealed type: \`Unknown | Literal[1, ""]\`",
27+
"targetType": "python",
28+
},
29+
{
30+
"code": "undefined-reveal",
31+
"column": "1",
32+
"file": "test_data/basic.in.py",
33+
"issueClass": "ISSUE_CLASS_EXISTING",
34+
"level": "LEVEL_MEDIUM",
35+
"line": "15",
36+
"linter": "ty",
37+
"message": "\`reveal_type\` used without importing it",
38+
"targetType": "python",
39+
},
40+
{
41+
"code": "unresolved-reference",
42+
"column": "1",
43+
"file": "test_data/basic.in.py",
44+
"issueClass": "ISSUE_CLASS_EXISTING",
45+
"level": "LEVEL_HIGH",
46+
"line": "24",
47+
"linter": "ty",
48+
"message": "Name \`ClassVar\` used when not defined",
49+
"targetType": "python",
50+
},
51+
{
52+
"code": "unresolved-attribute",
53+
"column": "1",
54+
"file": "test_data/basic.in.py",
55+
"issueClass": "ISSUE_CLASS_EXISTING",
56+
"level": "LEVEL_HIGH",
57+
"line": "31",
58+
"linter": "ty",
59+
"message": "Attribute \`z\` can only be accessed on instances, not on the class object \`<class 'A'>\` itself.",
60+
"targetType": "python",
61+
},
62+
{
63+
"code": "invalid-return-type",
64+
"column": "1",
65+
"file": "test_data/basic.in.py",
66+
"issueClass": "ISSUE_CLASS_EXISTING",
67+
"level": "LEVEL_HIGH",
68+
"line": "39",
69+
"linter": "ty",
70+
"message": "Function can implicitly return \`None\`, which is not assignable to return type \`bool\`",
71+
"targetType": "python",
72+
},
73+
{
74+
"code": "invalid-return-type",
75+
"column": "1",
76+
"file": "test_data/basic.in.py",
77+
"issueClass": "ISSUE_CLASS_EXISTING",
78+
"level": "LEVEL_HIGH",
79+
"line": "5",
80+
"linter": "ty",
81+
"message": "Return type does not match returned value: expected \`str\`, found \`int\`",
82+
"targetType": "python",
83+
},
84+
{
85+
"code": "revealed-type",
86+
"column": "1",
87+
"file": "test_data/basic.in.py",
88+
"issueClass": "ISSUE_CLASS_EXISTING",
89+
"level": "LEVEL_LOW",
90+
"line": "50",
91+
"linter": "ty",
92+
"message": "Revealed type: \`int | None\`",
93+
"targetType": "python",
94+
},
95+
{
96+
"code": "undefined-reveal",
97+
"column": "1",
98+
"file": "test_data/basic.in.py",
99+
"issueClass": "ISSUE_CLASS_EXISTING",
100+
"level": "LEVEL_MEDIUM",
101+
"line": "50",
102+
"linter": "ty",
103+
"message": "\`reveal_type\` used without importing it",
104+
"targetType": "python",
105+
},
106+
{
107+
"code": "unsupported-operator",
108+
"column": "1",
109+
"file": "test_data/basic.in.py",
110+
"issueClass": "ISSUE_CLASS_EXISTING",
111+
"level": "LEVEL_HIGH",
112+
"line": "51",
113+
"linter": "ty",
114+
"message": "Operator \`+\` is unsupported between objects of type \`int | None\` and \`Literal[1]\`",
115+
"targetType": "python",
116+
},
117+
{
118+
"code": "revealed-type",
119+
"column": "1",
120+
"file": "test_data/basic.in.py",
121+
"issueClass": "ISSUE_CLASS_EXISTING",
122+
"level": "LEVEL_LOW",
123+
"line": "53",
124+
"linter": "ty",
125+
"message": "Revealed type: \`int | None\`",
126+
"targetType": "python",
127+
},
128+
{
129+
"code": "undefined-reveal",
130+
"column": "1",
131+
"file": "test_data/basic.in.py",
132+
"issueClass": "ISSUE_CLASS_EXISTING",
133+
"level": "LEVEL_MEDIUM",
134+
"line": "53",
135+
"linter": "ty",
136+
"message": "\`reveal_type\` used without importing it",
137+
"targetType": "python",
138+
},
139+
{
140+
"code": "unsupported-operator",
141+
"column": "1",
142+
"file": "test_data/basic.in.py",
143+
"issueClass": "ISSUE_CLASS_EXISTING",
144+
"level": "LEVEL_HIGH",
145+
"line": "53",
146+
"linter": "ty",
147+
"message": "Operator \`+\` is unsupported between objects of type \`int | None\` and \`Literal[1]\`",
148+
"targetType": "python",
149+
},
150+
],
151+
"lintActions": [
152+
{
153+
"command": "check",
154+
"fileGroupName": "python",
155+
"linter": "ty",
156+
"paths": [
157+
"test_data/basic.in.py",
158+
],
159+
"verb": "TRUNK_VERB_CHECK",
160+
},
161+
{
162+
"command": "check",
163+
"fileGroupName": "python",
164+
"linter": "ty",
165+
"paths": [
166+
"test_data/basic.in.py",
167+
],
168+
"upstream": true,
169+
"verb": "TRUNK_VERB_CHECK",
170+
},
171+
],
172+
"taskFailures": [],
173+
"unformattedFiles": [],
174+
}
175+
`;
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
// trunk-upgrade-validation:RELEASE
3+
4+
exports[`Testing linter ty test interface 1`] = `
5+
{
6+
"issues": [
7+
{
8+
"code": "unresolved-reference",
9+
"column": "1",
10+
"file": "test_data/interface.in.pyi",
11+
"issueClass": "ISSUE_CLASS_EXISTING",
12+
"level": "LEVEL_HIGH",
13+
"line": "11",
14+
"linter": "ty",
15+
"message": "Name \`overload\` used when not defined",
16+
"targetType": "python-interface",
17+
},
18+
{
19+
"code": "unresolved-reference",
20+
"column": "1",
21+
"file": "test_data/interface.in.pyi",
22+
"issueClass": "ISSUE_CLASS_EXISTING",
23+
"level": "LEVEL_HIGH",
24+
"line": "14",
25+
"linter": "ty",
26+
"message": "Name \`overload\` used when not defined",
27+
"targetType": "python-interface",
28+
},
29+
{
30+
"code": "unresolved-reference",
31+
"column": "1",
32+
"file": "test_data/interface.in.pyi",
33+
"issueClass": "ISSUE_CLASS_EXISTING",
34+
"level": "LEVEL_HIGH",
35+
"line": "31",
36+
"linter": "ty",
37+
"message": "Name \`decorated\` used when not defined",
38+
"targetType": "python-interface",
39+
},
40+
],
41+
"lintActions": [
42+
{
43+
"command": "check",
44+
"fileGroupName": "python-interface",
45+
"linter": "ty",
46+
"paths": [
47+
"test_data/interface.in.pyi",
48+
],
49+
"verb": "TRUNK_VERB_CHECK",
50+
},
51+
{
52+
"command": "check",
53+
"fileGroupName": "python-interface",
54+
"linter": "ty",
55+
"paths": [
56+
"test_data/interface.in.pyi",
57+
],
58+
"upstream": true,
59+
"verb": "TRUNK_VERB_CHECK",
60+
},
61+
],
62+
"taskFailures": [],
63+
"unformattedFiles": [],
64+
}
65+
`;

0 commit comments

Comments
 (0)