@zzzen/pyright-internal 1.2.0-dev.20230618 → 1.2.0-dev.20230702

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/analyzer/binder.js +9 -1
  2. package/dist/analyzer/binder.js.map +1 -1
  3. package/dist/analyzer/codeFlowEngine.js +28 -4
  4. package/dist/analyzer/codeFlowEngine.js.map +1 -1
  5. package/dist/analyzer/codeFlowUtils.js +2 -0
  6. package/dist/analyzer/codeFlowUtils.js.map +1 -1
  7. package/dist/analyzer/constraintSolver.js +15 -1
  8. package/dist/analyzer/constraintSolver.js.map +1 -1
  9. package/dist/analyzer/constructors.js +19 -2
  10. package/dist/analyzer/constructors.js.map +1 -1
  11. package/dist/analyzer/dataClasses.js +64 -0
  12. package/dist/analyzer/dataClasses.js.map +1 -1
  13. package/dist/analyzer/decorators.d.ts +7 -0
  14. package/dist/analyzer/decorators.js +438 -0
  15. package/dist/analyzer/decorators.js.map +1 -0
  16. package/dist/analyzer/operations.d.ts +1 -1
  17. package/dist/analyzer/operations.js +4 -4
  18. package/dist/analyzer/operations.js.map +1 -1
  19. package/dist/analyzer/parameterUtils.d.ts +2 -1
  20. package/dist/analyzer/parameterUtils.js +1 -0
  21. package/dist/analyzer/parameterUtils.js.map +1 -1
  22. package/dist/analyzer/program.d.ts +1 -0
  23. package/dist/analyzer/program.js +52 -33
  24. package/dist/analyzer/program.js.map +1 -1
  25. package/dist/analyzer/protocols.js +2 -2
  26. package/dist/analyzer/protocols.js.map +1 -1
  27. package/dist/analyzer/sourceFile.js +1 -0
  28. package/dist/analyzer/sourceFile.js.map +1 -1
  29. package/dist/analyzer/sourceFileInfoUtils.d.ts +4 -2
  30. package/dist/analyzer/sourceFileInfoUtils.js +67 -10
  31. package/dist/analyzer/sourceFileInfoUtils.js.map +1 -1
  32. package/dist/analyzer/typeEvaluator.js +192 -578
  33. package/dist/analyzer/typeEvaluator.js.map +1 -1
  34. package/dist/analyzer/typeEvaluatorTypes.d.ts +3 -2
  35. package/dist/analyzer/typeEvaluatorTypes.js +2 -2
  36. package/dist/analyzer/typeEvaluatorTypes.js.map +1 -1
  37. package/dist/analyzer/typeGuards.js +21 -18
  38. package/dist/analyzer/typeGuards.js.map +1 -1
  39. package/dist/analyzer/typePrinter.d.ts +2 -1
  40. package/dist/analyzer/typePrinter.js +27 -5
  41. package/dist/analyzer/typePrinter.js.map +1 -1
  42. package/dist/analyzer/typeUtils.d.ts +3 -1
  43. package/dist/analyzer/typeUtils.js +30 -10
  44. package/dist/analyzer/typeUtils.js.map +1 -1
  45. package/dist/analyzer/typedDicts.js +9 -11
  46. package/dist/analyzer/typedDicts.js.map +1 -1
  47. package/dist/analyzer/types.d.ts +5 -3
  48. package/dist/analyzer/types.js +49 -11
  49. package/dist/analyzer/types.js.map +1 -1
  50. package/dist/backgroundThreadBase.js +1 -1
  51. package/dist/backgroundThreadBase.js.map +1 -1
  52. package/dist/common/extensibility.d.ts +3 -3
  53. package/dist/common/extensibility.js.map +1 -1
  54. package/dist/languageServerBase.js +2 -1
  55. package/dist/languageServerBase.js.map +1 -1
  56. package/dist/languageService/documentSymbolCollector.js +2 -2
  57. package/dist/languageService/documentSymbolCollector.js.map +1 -1
  58. package/dist/languageService/hoverProvider.js +13 -9
  59. package/dist/languageService/hoverProvider.js.map +1 -1
  60. package/dist/localization/localize.d.ts +0 -4
  61. package/dist/localization/localize.js +0 -1
  62. package/dist/localization/localize.js.map +1 -1
  63. package/dist/localization/package.nls.en-us.json +0 -1
  64. package/dist/parser/parseNodes.d.ts +2 -1
  65. package/dist/parser/parseNodes.js +2 -1
  66. package/dist/parser/parseNodes.js.map +1 -1
  67. package/dist/parser/parser.js +10 -10
  68. package/dist/parser/parser.js.map +1 -1
  69. package/dist/pyright.js +40 -2
  70. package/dist/pyright.js.map +1 -1
  71. package/dist/tests/chainedSourceFiles.test.js +39 -1
  72. package/dist/tests/chainedSourceFiles.test.js.map +1 -1
  73. package/dist/tests/checker.test.js +1 -1
  74. package/dist/tests/fourslash/completions.typeAlias.fourslash.js +1 -1
  75. package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js +1 -1
  76. package/dist/tests/fourslash/hover.docstring.alias.fourslash.js +3 -3
  77. package/dist/tests/fourslash/hover.init.fourslash.js +1 -1
  78. package/dist/tests/fourslash/hover.variable.docString.fourslash.js +1 -1
  79. package/dist/tests/positionUtils.test.js +10 -0
  80. package/dist/tests/positionUtils.test.js.map +1 -1
  81. package/dist/tests/tokenizer.test.js +12 -1
  82. package/dist/tests/tokenizer.test.js.map +1 -1
  83. package/dist/tests/typeEvaluator1.test.js +184 -136
  84. package/dist/tests/typeEvaluator1.test.js.map +1 -1
  85. package/dist/tests/typeEvaluator2.test.js +248 -330
  86. package/dist/tests/typeEvaluator2.test.js.map +1 -1
  87. package/dist/tests/typeEvaluator3.test.js +222 -177
  88. package/dist/tests/typeEvaluator3.test.js.map +1 -1
  89. package/dist/tests/typeEvaluator4.test.js +63 -47
  90. package/dist/tests/typeEvaluator4.test.js.map +1 -1
  91. package/dist/tests/typePrinter.test.js +2 -2
  92. package/dist/workspaceFactory.d.ts +2 -1
  93. package/dist/workspaceFactory.js +3 -2
  94. package/dist/workspaceFactory.js.map +1 -1
  95. package/package.json +1 -1
@@ -41,70 +41,70 @@ test('Module2', () => {
41
41
  });
42
42
  test('Ellipsis1', () => {
43
43
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['ellipsis1.pyi']);
44
- TestUtils.validateResults(analysisResults, 10);
44
+ TestUtils.validateResults(analysisResults, 11);
45
45
  });
46
- test('Generators1', () => {
47
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators1.py']);
46
+ test('Generator1', () => {
47
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator1.py']);
48
48
  TestUtils.validateResults(analysisResults, 9);
49
49
  });
50
- test('Generators2', () => {
51
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators2.py']);
50
+ test('Generator2', () => {
51
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator2.py']);
52
52
  TestUtils.validateResults(analysisResults, 2);
53
53
  });
54
- test('Generators3', () => {
55
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators3.py']);
54
+ test('Generator3', () => {
55
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator3.py']);
56
56
  TestUtils.validateResults(analysisResults, 1);
57
57
  });
58
- test('Generators4', () => {
59
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators4.py']);
58
+ test('Generator4', () => {
59
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator4.py']);
60
60
  TestUtils.validateResults(analysisResults, 0);
61
61
  });
62
- test('Generators5', () => {
63
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators5.py']);
62
+ test('Generator5', () => {
63
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator5.py']);
64
64
  TestUtils.validateResults(analysisResults, 0);
65
65
  });
66
- test('Generators6', () => {
67
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators6.py']);
66
+ test('Generator6', () => {
67
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator6.py']);
68
68
  TestUtils.validateResults(analysisResults, 0);
69
69
  });
70
- test('Generators7', () => {
71
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators7.py']);
70
+ test('Generator7', () => {
71
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator7.py']);
72
72
  TestUtils.validateResults(analysisResults, 0);
73
73
  });
74
- test('Generators8', () => {
75
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators8.py']);
74
+ test('Generator8', () => {
75
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator8.py']);
76
76
  TestUtils.validateResults(analysisResults, 0);
77
77
  });
78
- test('Generators9', () => {
79
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators9.py']);
78
+ test('Generator9', () => {
79
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator9.py']);
80
80
  TestUtils.validateResults(analysisResults, 2);
81
81
  });
82
- test('Generators10', () => {
83
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators10.py']);
82
+ test('Generator10', () => {
83
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator10.py']);
84
84
  TestUtils.validateResults(analysisResults, 0);
85
85
  });
86
- test('Generators11', () => {
87
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators11.py']);
86
+ test('Generator11', () => {
87
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator11.py']);
88
88
  TestUtils.validateResults(analysisResults, 2);
89
89
  });
90
- test('Generators12', () => {
91
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators12.py']);
90
+ test('Generator12', () => {
91
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator12.py']);
92
92
  TestUtils.validateResults(analysisResults, 1);
93
93
  });
94
- test('Generators13', () => {
95
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators13.py']);
94
+ test('Generator13', () => {
95
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator13.py']);
96
96
  TestUtils.validateResults(analysisResults, 0);
97
97
  });
98
- test('Generators14', () => {
99
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators14.py']);
98
+ test('Generator14', () => {
99
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator14.py']);
100
100
  TestUtils.validateResults(analysisResults, 0);
101
101
  });
102
- test('Generators15', () => {
103
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators15.py']);
102
+ test('Generator15', () => {
103
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator15.py']);
104
104
  TestUtils.validateResults(analysisResults, 3);
105
105
  });
106
- test('Generators16', () => {
107
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generators16.py']);
106
+ test('Generator16', () => {
107
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['generator16.py']);
108
108
  TestUtils.validateResults(analysisResults, 1);
109
109
  });
110
110
  test('Await1', () => {
@@ -135,152 +135,156 @@ test('Coroutines3', () => {
135
135
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['coroutines3.py'], configOptions);
136
136
  TestUtils.validateResults(analysisResults, 0);
137
137
  });
138
- test('Loops1', () => {
139
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops1.py']);
138
+ test('Loop1', () => {
139
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop1.py']);
140
140
  TestUtils.validateResults(analysisResults, 2);
141
141
  });
142
- test('Loops2', () => {
143
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops2.py']);
142
+ test('Loop2', () => {
143
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop2.py']);
144
144
  TestUtils.validateResults(analysisResults, 0);
145
145
  });
146
- test('Loops3', () => {
147
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops3.py']);
146
+ test('Loop3', () => {
147
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop3.py']);
148
148
  TestUtils.validateResults(analysisResults, 0);
149
149
  });
150
- test('Loops4', () => {
151
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops4.py']);
150
+ test('Loop4', () => {
151
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop4.py']);
152
152
  TestUtils.validateResults(analysisResults, 0);
153
153
  });
154
- test('Loops5', () => {
155
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops5.py']);
154
+ test('Loop5', () => {
155
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop5.py']);
156
156
  TestUtils.validateResults(analysisResults, 0);
157
157
  });
158
- test('Loops6', () => {
159
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops6.py']);
158
+ test('Loop6', () => {
159
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop6.py']);
160
160
  TestUtils.validateResults(analysisResults, 0);
161
161
  });
162
- test('Loops7', () => {
163
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops7.py']);
162
+ test('Loop7', () => {
163
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop7.py']);
164
164
  TestUtils.validateResults(analysisResults, 0);
165
165
  });
166
- test('Loops8', () => {
167
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops8.py']);
166
+ test('Loop8', () => {
167
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop8.py']);
168
168
  TestUtils.validateResults(analysisResults, 0);
169
169
  });
170
- test('Loops9', () => {
171
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops9.py']);
170
+ test('Loop9', () => {
171
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop9.py']);
172
172
  TestUtils.validateResults(analysisResults, 0);
173
173
  });
174
- test('Loops10', () => {
175
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops10.py']);
174
+ test('Loop10', () => {
175
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop10.py']);
176
176
  TestUtils.validateResults(analysisResults, 0);
177
177
  });
178
- test('Loops11', () => {
179
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops11.py']);
178
+ test('Loop11', () => {
179
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop11.py']);
180
180
  TestUtils.validateResults(analysisResults, 3);
181
181
  });
182
- test('Loops12', () => {
183
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops12.py']);
182
+ test('Loop12', () => {
183
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop12.py']);
184
184
  TestUtils.validateResults(analysisResults, 1);
185
185
  });
186
- test('Loops13', () => {
187
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops13.py']);
186
+ test('Loop13', () => {
187
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop13.py']);
188
188
  TestUtils.validateResults(analysisResults, 0);
189
189
  });
190
- test('Loops14', () => {
191
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops14.py']);
190
+ test('Loop14', () => {
191
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop14.py']);
192
192
  TestUtils.validateResults(analysisResults, 0);
193
193
  });
194
- test('Loops15', () => {
195
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops15.py']);
194
+ test('Loop15', () => {
195
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop15.py']);
196
196
  TestUtils.validateResults(analysisResults, 0);
197
197
  });
198
- test('Loops16', () => {
199
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops16.py']);
198
+ test('Loop16', () => {
199
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop16.py']);
200
200
  TestUtils.validateResults(analysisResults, 0);
201
201
  });
202
- test('Loops17', () => {
203
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops17.py']);
202
+ test('Loop17', () => {
203
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop17.py']);
204
204
  TestUtils.validateResults(analysisResults, 0);
205
205
  });
206
- test('Loops18', () => {
207
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops18.py']);
206
+ test('Loop18', () => {
207
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop18.py']);
208
208
  TestUtils.validateResults(analysisResults, 0);
209
209
  });
210
- test('Loops19', () => {
211
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops19.py']);
210
+ test('Loop19', () => {
211
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop19.py']);
212
212
  TestUtils.validateResults(analysisResults, 0);
213
213
  });
214
- test('Loops20', () => {
215
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops20.py']);
214
+ test('Loop20', () => {
215
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop20.py']);
216
216
  TestUtils.validateResults(analysisResults, 0);
217
217
  });
218
- test('Loops21', () => {
219
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops21.py']);
218
+ test('Loop21', () => {
219
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop21.py']);
220
220
  TestUtils.validateResults(analysisResults, 0);
221
221
  });
222
- test('Loops22', () => {
223
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops22.py']);
222
+ test('Loop22', () => {
223
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop22.py']);
224
224
  TestUtils.validateResults(analysisResults, 0);
225
225
  });
226
- test('Loops23', () => {
227
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops23.py']);
226
+ test('Loop23', () => {
227
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop23.py']);
228
228
  TestUtils.validateResults(analysisResults, 0);
229
229
  });
230
- test('Loops24', () => {
231
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops24.py']);
230
+ test('Loop24', () => {
231
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop24.py']);
232
232
  TestUtils.validateResults(analysisResults, 0);
233
233
  });
234
- test('Loops25', () => {
235
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops25.py']);
234
+ test('Loop25', () => {
235
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop25.py']);
236
236
  TestUtils.validateResults(analysisResults, 0);
237
237
  });
238
- test('Loops26', () => {
239
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops26.py']);
238
+ test('Loop26', () => {
239
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop26.py']);
240
240
  TestUtils.validateResults(analysisResults, 0);
241
241
  });
242
- test('Loops27', () => {
243
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops27.py']);
242
+ test('Loop27', () => {
243
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop27.py']);
244
244
  TestUtils.validateResults(analysisResults, 0);
245
245
  });
246
- test('Loops28', () => {
247
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops28.py']);
246
+ test('Loop28', () => {
247
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop28.py']);
248
248
  TestUtils.validateResults(analysisResults, 0);
249
249
  });
250
- test('Loops29', () => {
251
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops29.py']);
250
+ test('Loop29', () => {
251
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop29.py']);
252
252
  TestUtils.validateResults(analysisResults, 0);
253
253
  });
254
- test('Loops30', () => {
255
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops30.py']);
254
+ test('Loop30', () => {
255
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop30.py']);
256
256
  TestUtils.validateResults(analysisResults, 0);
257
257
  });
258
- test('Loops31', () => {
259
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops31.py']);
258
+ test('Loop31', () => {
259
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop31.py']);
260
260
  TestUtils.validateResults(analysisResults, 1);
261
261
  });
262
- test('Loops32', () => {
263
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops32.py']);
262
+ test('Loop32', () => {
263
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop32.py']);
264
+ TestUtils.validateResults(analysisResults, 0);
265
+ });
266
+ test('Loop33', () => {
267
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop33.py']);
264
268
  TestUtils.validateResults(analysisResults, 0);
265
269
  });
266
- test('Loops33', () => {
267
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops33.py']);
270
+ test('Loop34', () => {
271
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop34.py']);
268
272
  TestUtils.validateResults(analysisResults, 0);
269
273
  });
270
- test('Loops34', () => {
271
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops34.py']);
274
+ test('Loop35', () => {
275
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop35.py']);
272
276
  TestUtils.validateResults(analysisResults, 0);
273
277
  });
274
- test('Loops35', () => {
275
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops35.py']);
278
+ test('Loop36', () => {
279
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop36.py']);
276
280
  TestUtils.validateResults(analysisResults, 0);
277
281
  });
278
- test('Loops36', () => {
279
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops36.py']);
282
+ test('Loop37', () => {
283
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop37.py']);
280
284
  TestUtils.validateResults(analysisResults, 0);
281
285
  });
282
- test('Loops37', () => {
283
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loops37.py']);
286
+ test('Loop38', () => {
287
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['loop38.py']);
284
288
  TestUtils.validateResults(analysisResults, 0);
285
289
  });
286
290
  test('ForLoop1', () => {
@@ -291,44 +295,44 @@ test('ForLoop2', () => {
291
295
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['forLoop2.py']);
292
296
  TestUtils.validateResults(analysisResults, 7);
293
297
  });
294
- test('ListComprehension1', () => {
295
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['listComprehension1.py']);
298
+ test('Comprehension1', () => {
299
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['comprehension1.py']);
296
300
  TestUtils.validateResults(analysisResults, 2);
297
301
  });
298
- test('ListComprehension2', () => {
299
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['listComprehension2.py']);
302
+ test('Comprehension2', () => {
303
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['comprehension2.py']);
300
304
  TestUtils.validateResults(analysisResults, 0);
301
305
  });
302
- test('ListComprehension3', () => {
303
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['listComprehension3.py']);
306
+ test('Comprehension3', () => {
307
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['comprehension3.py']);
304
308
  TestUtils.validateResults(analysisResults, 0);
305
309
  });
306
- test('ListComprehension4', () => {
307
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['listComprehension4.py']);
310
+ test('Comprehension4', () => {
311
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['comprehension4.py']);
308
312
  TestUtils.validateResults(analysisResults, 0);
309
313
  });
310
- test('ListComprehension5', () => {
311
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['listComprehension5.py']);
314
+ test('Comprehension5', () => {
315
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['comprehension5.py']);
312
316
  TestUtils.validateResults(analysisResults, 0);
313
317
  });
314
- test('ListComprehension6', () => {
315
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['listComprehension6.py']);
318
+ test('Comprehension6', () => {
319
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['comprehension6.py']);
316
320
  TestUtils.validateResults(analysisResults, 4);
317
321
  });
318
- test('ListComprehension7', () => {
319
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['listComprehension7.py']);
322
+ test('Comprehension7', () => {
323
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['comprehension7.py']);
320
324
  TestUtils.validateResults(analysisResults, 1);
321
325
  });
322
- test('ListComprehension8', () => {
323
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['listComprehension8.py']);
326
+ test('Comprehension8', () => {
327
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['comprehension8.py']);
324
328
  TestUtils.validateResults(analysisResults, 0);
325
329
  });
326
- test('ListComprehension9', () => {
327
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['listComprehension9.py']);
330
+ test('Comprehension9', () => {
331
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['comprehension9.py']);
328
332
  TestUtils.validateResults(analysisResults, 0);
329
333
  });
330
- test('SetComprehension1', () => {
331
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['setComprehension1.py']);
334
+ test('Comprehension10', () => {
335
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['comprehension10.py']);
332
336
  TestUtils.validateResults(analysisResults, 1);
333
337
  });
334
338
  test('Literals1', () => {
@@ -444,6 +448,14 @@ test('TypeAlias20', () => {
444
448
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeAlias20.py']);
445
449
  TestUtils.validateResults(analysisResults, 0);
446
450
  });
451
+ test('TypeAlias21', () => {
452
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeAlias21.py']);
453
+ TestUtils.validateResults(analysisResults, 0);
454
+ });
455
+ test('TypeAlias22', () => {
456
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeAlias22.py']);
457
+ TestUtils.validateResults(analysisResults, 6);
458
+ });
447
459
  test('RecursiveTypeAlias1', () => {
448
460
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['recursiveTypeAlias1.py']);
449
461
  TestUtils.validateResults(analysisResults, 13);
@@ -596,44 +608,44 @@ test('MethodOverride6', () => {
596
608
  const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['methodOverride6.py'], configOptions);
597
609
  TestUtils.validateResults(analysisResults2, 2);
598
610
  });
599
- test('Enums1', () => {
600
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enums1.py']);
611
+ test('Enum1', () => {
612
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enum1.py']);
601
613
  TestUtils.validateResults(analysisResults, 3);
602
614
  });
603
- test('Enums2', () => {
604
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enums2.py']);
605
- TestUtils.validateResults(analysisResults, 0);
606
- });
607
- test('Enums3', () => {
608
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enums3.py']);
615
+ test('Enum2', () => {
616
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enum2.py']);
609
617
  TestUtils.validateResults(analysisResults, 0);
610
618
  });
611
- test('Enums4', () => {
612
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enums4.py']);
619
+ test('Enum3', () => {
620
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enum3.py']);
613
621
  TestUtils.validateResults(analysisResults, 0);
614
622
  });
615
- test('Enums5', () => {
616
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enums5.py']);
623
+ test('Enum4', () => {
624
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enum4.py']);
617
625
  TestUtils.validateResults(analysisResults, 0);
618
626
  });
619
- test('Enums6', () => {
620
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enums6.py']);
627
+ test('Enum5', () => {
628
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enum5.py']);
621
629
  TestUtils.validateResults(analysisResults, 0);
622
630
  });
623
- test('Enums7', () => {
624
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enums7.py']);
631
+ test('Enum6', () => {
632
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enum6.py']);
625
633
  TestUtils.validateResults(analysisResults, 4);
626
634
  });
627
- test('Enums8', () => {
628
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enums8.py']);
635
+ test('Enum7', () => {
636
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enum7.py']);
629
637
  TestUtils.validateResults(analysisResults, 1);
630
638
  });
631
- test('Enums9', () => {
632
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enums9.py']);
639
+ test('Enum8', () => {
640
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enum8.py']);
641
+ TestUtils.validateResults(analysisResults, 0);
642
+ });
643
+ test('EnumAuto1', () => {
644
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enumAuto1.py']);
633
645
  TestUtils.validateResults(analysisResults, 0);
634
646
  });
635
- test('Enums10', () => {
636
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enums10.py']);
647
+ test('EnumGenNextValue1', () => {
648
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enumGenNextValue1.py']);
637
649
  TestUtils.validateResults(analysisResults, 0);
638
650
  });
639
651
  test('TypeGuard1', () => {
@@ -830,69 +842,69 @@ test('Match3', () => {
830
842
  const configOptions = new configOptions_1.ConfigOptions('.');
831
843
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
832
844
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match3.py'], configOptions);
833
- TestUtils.validateResults(analysisResults, 4);
845
+ TestUtils.validateResults(analysisResults, 0);
834
846
  });
835
- test('Match4', () => {
847
+ test('MatchSequence1', () => {
836
848
  const configOptions = new configOptions_1.ConfigOptions('.');
837
849
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
838
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match4.py'], configOptions);
839
- TestUtils.validateResults(analysisResults, 0);
850
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchSequence1.py'], configOptions);
851
+ TestUtils.validateResults(analysisResults, 2);
840
852
  });
841
- test('Match5', () => {
853
+ test('MatchClass1', () => {
842
854
  const configOptions = new configOptions_1.ConfigOptions('.');
843
855
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
844
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match5.py'], configOptions);
845
- TestUtils.validateResults(analysisResults, 2);
856
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass1.py'], configOptions);
857
+ TestUtils.validateResults(analysisResults, 4);
846
858
  });
847
- test('Match6', () => {
859
+ test('MatchClass2', () => {
848
860
  const configOptions = new configOptions_1.ConfigOptions('.');
849
861
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
850
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match6.py'], configOptions);
862
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass2.py'], configOptions);
851
863
  TestUtils.validateResults(analysisResults, 0);
852
864
  });
853
- test('Match7', () => {
865
+ test('MatchClass3', () => {
854
866
  const configOptions = new configOptions_1.ConfigOptions('.');
855
867
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
856
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match7.py'], configOptions);
857
- TestUtils.validateResults(analysisResults, 2);
868
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass3.py'], configOptions);
869
+ TestUtils.validateResults(analysisResults, 0);
858
870
  });
859
- test('Match8', () => {
871
+ test('MatchValue1', () => {
860
872
  const configOptions = new configOptions_1.ConfigOptions('.');
861
873
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
862
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match8.py'], configOptions);
874
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchValue1.py'], configOptions);
863
875
  TestUtils.validateResults(analysisResults, 0);
864
876
  });
865
- test('Match9', () => {
877
+ test('MatchMapping1', () => {
866
878
  const configOptions = new configOptions_1.ConfigOptions('.');
867
879
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
868
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match9.py'], configOptions);
880
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchMapping1.py'], configOptions);
881
+ TestUtils.validateResults(analysisResults, 2);
882
+ });
883
+ test('MatchLiteral1', () => {
884
+ const configOptions = new configOptions_1.ConfigOptions('.');
885
+ configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
886
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchLiteral1.py'], configOptions);
869
887
  TestUtils.validateResults(analysisResults, 0);
870
888
  });
871
- test('Match10', () => {
889
+ test('MatchExhaustion1', () => {
872
890
  const configOptions = new configOptions_1.ConfigOptions('.');
873
891
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
874
892
  configOptions.diagnosticRuleSet.reportMatchNotExhaustive = 'none';
875
- const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['match10.py'], configOptions);
893
+ const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['matchExhaustion1.py'], configOptions);
876
894
  TestUtils.validateResults(analysisResults1, 0);
877
895
  configOptions.diagnosticRuleSet.reportMatchNotExhaustive = 'error';
878
- const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['match10.py'], configOptions);
896
+ const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['matchExhaustion1.py'], configOptions);
879
897
  TestUtils.validateResults(analysisResults2, 4);
880
898
  });
881
- test('Match11', () => {
899
+ test('MatchUnnecessary1', () => {
882
900
  const configOptions = new configOptions_1.ConfigOptions('.');
883
901
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
884
- const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['match11.py'], configOptions);
902
+ const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['matchUnnecessary1.py'], configOptions);
885
903
  TestUtils.validateResults(analysisResults1, 0);
886
904
  configOptions.diagnosticRuleSet.reportUnnecessaryComparison = 'error';
887
- const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['match11.py'], configOptions);
905
+ const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['matchUnnecessary1.py'], configOptions);
888
906
  TestUtils.validateResults(analysisResults2, 7);
889
907
  });
890
- test('Match12', () => {
891
- const configOptions = new configOptions_1.ConfigOptions('.');
892
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
893
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match12.py'], configOptions);
894
- TestUtils.validateResults(analysisResults, 0);
895
- });
896
908
  test('List1', () => {
897
909
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['list1.py']);
898
910
  TestUtils.validateResults(analysisResults, 3);
@@ -1017,6 +1029,39 @@ test('Constructor19', () => {
1017
1029
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor19.py']);
1018
1030
  TestUtils.validateResults(analysisResults, 1);
1019
1031
  });
1032
+ test('Constructor20', () => {
1033
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor20.py']);
1034
+ TestUtils.validateResults(analysisResults, 2);
1035
+ });
1036
+ test('Constructor21', () => {
1037
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor21.py']);
1038
+ TestUtils.validateResults(analysisResults, 1);
1039
+ });
1040
+ test('Constructor22', () => {
1041
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor22.py']);
1042
+ TestUtils.validateResults(analysisResults, 0);
1043
+ });
1044
+ test('Constructor23', () => {
1045
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor23.py']);
1046
+ TestUtils.validateResults(analysisResults, 0);
1047
+ });
1048
+ test('Constructor24', () => {
1049
+ const configOptions = new configOptions_1.ConfigOptions('.');
1050
+ configOptions.diagnosticRuleSet.strictParameterNoneValue = false;
1051
+ let analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor24.py'], configOptions);
1052
+ TestUtils.validateResults(analysisResults, 4);
1053
+ configOptions.diagnosticRuleSet.strictParameterNoneValue = true;
1054
+ analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor24.py'], configOptions);
1055
+ TestUtils.validateResults(analysisResults, 4);
1056
+ });
1057
+ test('Constructor25', () => {
1058
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor25.py']);
1059
+ TestUtils.validateResults(analysisResults, 1);
1060
+ });
1061
+ test('Constructor26', () => {
1062
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor26.py']);
1063
+ TestUtils.validateResults(analysisResults, 6);
1064
+ });
1020
1065
  test('InconsistentConstructor1', () => {
1021
1066
  const configOptions = new configOptions_1.ConfigOptions('.');
1022
1067
  configOptions.diagnosticRuleSet.reportInconsistentConstructor = 'none';