@zzzen/pyright-internal 1.2.0-dev.20230507 → 1.2.0-dev.20230514

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 (142) hide show
  1. package/dist/analyzer/backgroundAnalysisProgram.d.ts +1 -1
  2. package/dist/analyzer/checker.js +37 -2
  3. package/dist/analyzer/checker.js.map +1 -1
  4. package/dist/analyzer/constraintSolver.js +14 -15
  5. package/dist/analyzer/constraintSolver.js.map +1 -1
  6. package/dist/analyzer/constructors.js +246 -189
  7. package/dist/analyzer/constructors.js.map +1 -1
  8. package/dist/analyzer/dataClasses.js +2 -2
  9. package/dist/analyzer/dataClasses.js.map +1 -1
  10. package/dist/analyzer/docStringConversion.js +1 -1
  11. package/dist/analyzer/docStringConversion.js.map +1 -1
  12. package/dist/analyzer/enums.js +8 -0
  13. package/dist/analyzer/enums.js.map +1 -1
  14. package/dist/analyzer/importResolver.js +47 -29
  15. package/dist/analyzer/importResolver.js.map +1 -1
  16. package/dist/analyzer/namedTuples.js +2 -5
  17. package/dist/analyzer/namedTuples.js.map +1 -1
  18. package/dist/analyzer/program.d.ts +7 -17
  19. package/dist/analyzer/program.js +32 -247
  20. package/dist/analyzer/program.js.map +1 -1
  21. package/dist/analyzer/protocols.js +1 -1
  22. package/dist/analyzer/protocols.js.map +1 -1
  23. package/dist/analyzer/service.d.ts +4 -12
  24. package/dist/analyzer/service.js +12 -23
  25. package/dist/analyzer/service.js.map +1 -1
  26. package/dist/analyzer/sourceFile.d.ts +2 -11
  27. package/dist/analyzer/sourceFile.js +11 -74
  28. package/dist/analyzer/sourceFile.js.map +1 -1
  29. package/dist/analyzer/symbol.d.ts +3 -1
  30. package/dist/analyzer/symbol.js +5 -0
  31. package/dist/analyzer/symbol.js.map +1 -1
  32. package/dist/analyzer/typeEvaluator.js +362 -142
  33. package/dist/analyzer/typeEvaluator.js.map +1 -1
  34. package/dist/analyzer/typeEvaluatorTypes.d.ts +4 -0
  35. package/dist/analyzer/typeEvaluatorTypes.js.map +1 -1
  36. package/dist/analyzer/typePrinter.d.ts +3 -3
  37. package/dist/analyzer/typePrinter.js +247 -100
  38. package/dist/analyzer/typePrinter.js.map +1 -1
  39. package/dist/analyzer/typeUtils.d.ts +12 -7
  40. package/dist/analyzer/typeUtils.js +173 -48
  41. package/dist/analyzer/typeUtils.js.map +1 -1
  42. package/dist/analyzer/typeVarContext.d.ts +1 -2
  43. package/dist/analyzer/typeVarContext.js +14 -32
  44. package/dist/analyzer/typeVarContext.js.map +1 -1
  45. package/dist/analyzer/types.d.ts +3 -2
  46. package/dist/analyzer/types.js +13 -10
  47. package/dist/analyzer/types.js.map +1 -1
  48. package/dist/backgroundAnalysisBase.d.ts +1 -1
  49. package/dist/backgroundAnalysisBase.js +16 -0
  50. package/dist/backgroundAnalysisBase.js.map +1 -1
  51. package/dist/commands/dumpFileDebugInfoCommand.js +0 -1
  52. package/dist/commands/dumpFileDebugInfoCommand.js.map +1 -1
  53. package/dist/common/extensibility.d.ts +26 -3
  54. package/dist/common/extensibility.js.map +1 -1
  55. package/dist/common/logTracker.d.ts +2 -0
  56. package/dist/common/logTracker.js +8 -1
  57. package/dist/common/logTracker.js.map +1 -1
  58. package/dist/common/lspUtils.d.ts +4 -1
  59. package/dist/common/lspUtils.js +38 -1
  60. package/dist/common/lspUtils.js.map +1 -1
  61. package/dist/common/pythonVersion.d.ts +2 -1
  62. package/dist/common/pythonVersion.js +1 -0
  63. package/dist/common/pythonVersion.js.map +1 -1
  64. package/dist/common/workspaceEditUtils.d.ts +3 -3
  65. package/dist/common/workspaceEditUtils.js +10 -10
  66. package/dist/common/workspaceEditUtils.js.map +1 -1
  67. package/dist/languageServerBase.d.ts +2 -5
  68. package/dist/languageServerBase.js +33 -60
  69. package/dist/languageServerBase.js.map +1 -1
  70. package/dist/languageService/autoImporter.d.ts +50 -51
  71. package/dist/languageService/autoImporter.js +125 -210
  72. package/dist/languageService/autoImporter.js.map +1 -1
  73. package/dist/languageService/callHierarchyProvider.js +6 -32
  74. package/dist/languageService/callHierarchyProvider.js.map +1 -1
  75. package/dist/languageService/completionProvider.d.ts +40 -79
  76. package/dist/languageService/completionProvider.js +571 -811
  77. package/dist/languageService/completionProvider.js.map +1 -1
  78. package/dist/languageService/documentSymbolCollector.d.ts +2 -2
  79. package/dist/languageService/documentSymbolCollector.js +33 -23
  80. package/dist/languageService/documentSymbolCollector.js.map +1 -1
  81. package/dist/languageService/documentSymbolProvider.d.ts +13 -35
  82. package/dist/languageService/documentSymbolProvider.js +52 -264
  83. package/dist/languageService/documentSymbolProvider.js.map +1 -1
  84. package/dist/languageService/hoverProvider.d.ts +1 -3
  85. package/dist/languageService/hoverProvider.js +11 -97
  86. package/dist/languageService/hoverProvider.js.map +1 -1
  87. package/dist/languageService/referencesProvider.d.ts +3 -3
  88. package/dist/languageService/referencesProvider.js +5 -7
  89. package/dist/languageService/referencesProvider.js.map +1 -1
  90. package/dist/languageService/renameProvider.d.ts +0 -1
  91. package/dist/languageService/renameProvider.js +2 -6
  92. package/dist/languageService/renameProvider.js.map +1 -1
  93. package/dist/languageService/symbolIndexer.d.ts +31 -0
  94. package/dist/languageService/symbolIndexer.js +105 -0
  95. package/dist/languageService/symbolIndexer.js.map +1 -0
  96. package/dist/languageService/tooltipUtils.d.ts +8 -1
  97. package/dist/languageService/tooltipUtils.js +102 -1
  98. package/dist/languageService/tooltipUtils.js.map +1 -1
  99. package/dist/languageService/workspaceSymbolProvider.d.ts +17 -0
  100. package/dist/languageService/workspaceSymbolProvider.js +133 -0
  101. package/dist/languageService/workspaceSymbolProvider.js.map +1 -0
  102. package/dist/localization/localize.d.ts +16 -1
  103. package/dist/localization/localize.js +9 -1
  104. package/dist/localization/localize.js.map +1 -1
  105. package/dist/localization/package.nls.en-us.json +9 -1
  106. package/dist/parser/parser.js +3 -0
  107. package/dist/parser/parser.js.map +1 -1
  108. package/dist/pyright.js +26 -4
  109. package/dist/pyright.js.map +1 -1
  110. package/dist/tests/chainedSourceFiles.test.js +15 -20
  111. package/dist/tests/chainedSourceFiles.test.js.map +1 -1
  112. package/dist/tests/checker.test.js +14 -0
  113. package/dist/tests/checker.test.js.map +1 -1
  114. package/dist/tests/completions.test.js +11 -236
  115. package/dist/tests/completions.test.js.map +1 -1
  116. package/dist/tests/docStringConversion.test.js +36 -2
  117. package/dist/tests/docStringConversion.test.js.map +1 -1
  118. package/dist/tests/fourslash/completions.override2.fourslash.js +1 -16
  119. package/dist/tests/fourslash/completions.override2.fourslash.js.map +1 -1
  120. package/dist/tests/harness/fourslash/testState.d.ts +14 -8
  121. package/dist/tests/harness/fourslash/testState.js +25 -36
  122. package/dist/tests/harness/fourslash/testState.js.map +1 -1
  123. package/dist/tests/importResolver.test.js +81 -1
  124. package/dist/tests/importResolver.test.js.map +1 -1
  125. package/dist/tests/typeEvaluator2.test.js +12 -0
  126. package/dist/tests/typeEvaluator2.test.js.map +1 -1
  127. package/dist/tests/typeEvaluator3.test.js +4 -0
  128. package/dist/tests/typeEvaluator3.test.js.map +1 -1
  129. package/dist/tests/typeEvaluator5.test.js +21 -9
  130. package/dist/tests/typeEvaluator5.test.js.map +1 -1
  131. package/dist/tests/workspaceEditUtils.test.js +15 -10
  132. package/dist/tests/workspaceEditUtils.test.js.map +1 -1
  133. package/package.json +1 -1
  134. package/dist/languageService/importAdder.d.ts +0 -40
  135. package/dist/languageService/importAdder.js +0 -388
  136. package/dist/languageService/importAdder.js.map +0 -1
  137. package/dist/tests/fourslash/completions.commitChars.fourslash.d.ts +0 -1
  138. package/dist/tests/fourslash/completions.commitChars.fourslash.js +0 -81
  139. package/dist/tests/fourslash/completions.commitChars.fourslash.js.map +0 -1
  140. package/dist/tests/importAdder.test.d.ts +0 -1
  141. package/dist/tests/importAdder.test.js +0 -1325
  142. package/dist/tests/importAdder.test.js.map +0 -1
@@ -27,7 +27,6 @@ const types_1 = require("./types");
27
27
  // If successful, it returns the resulting (specialized) object type that
28
28
  // is allocated by the constructor. If unsuccessful, it reports diagnostics.
29
29
  function validateConstructorArguments(evaluator, errorNode, argList, type, skipUnknownArgCheck, inferenceContext) {
30
- var _a;
31
30
  // If there a custom `__call__` method on the metaclass, assume that it
32
31
  // overrides the normal `type.__call__` logic and don't perform the usual
33
32
  // __new__ and __init__ validation.
@@ -36,170 +35,109 @@ function validateConstructorArguments(evaluator, errorNode, argList, type, skipU
36
35
  return metaclassResult;
37
36
  }
38
37
  // Determine whether the class overrides the object.__new__ method.
39
- const newMethodInfo = evaluator.getTypeOfClassMemberName(errorNode, type,
38
+ const newMethodTypeResult = evaluator.getTypeOfClassMemberName(errorNode, type,
40
39
  /* isAccessedThroughObject */ false, '__new__', { method: 'get' },
41
40
  /* diag */ undefined, 1 /* AccessClassMembersOnly */ |
42
41
  4 /* SkipObjectBaseClass */ |
43
42
  16 /* TreatConstructorAsClassMethod */, type);
44
- // Determine whether the class overrides the object.__init__ method.
45
- const initMethodInfo = evaluator.getTypeOfObjectMember(errorNode, types_1.ClassType.cloneAsInstance(type), '__init__', { method: 'get' },
46
- /* diag */ undefined, 4 /* SkipObjectBaseClass */ | 64 /* SkipAttributeAccessOverride */);
47
43
  let returnType;
48
- let validatedTypes = false;
44
+ let validatedArgExpressions = false;
49
45
  let argumentErrors = false;
50
46
  let isTypeIncomplete = false;
51
47
  const overloadsUsedForCall = [];
52
- // If the class doesn't override object.__new__ or object.__init__, use the
53
- // fallback constructor type evaluation for the `object` class.
54
- if (!newMethodInfo && !initMethodInfo) {
55
- const callResult = validateFallbackConstructorCall(evaluator, errorNode, argList, type, inferenceContext);
56
- if (callResult.argumentErrors) {
57
- argumentErrors = true;
48
+ let newMethodReturnType;
49
+ const useConstructorTransform = (0, constructorTransform_1.hasConstructorTransform)(type);
50
+ // If there is a constructor transform, evaluate all arguments speculatively
51
+ // so we can later re-evaluate them in the context of the transform.
52
+ evaluator.useSpeculativeMode(useConstructorTransform ? errorNode : undefined, () => {
53
+ var _a;
54
+ // Validate __new__ if it is present.
55
+ if (newMethodTypeResult) {
56
+ // Use speculative mode for arg expressions because we don't know whether
57
+ // we'll need to re-evaluate these expressions later for __init__.
58
+ const newCallResult = validateNewMethod(evaluator, errorNode, argList, type, skipUnknownArgCheck, inferenceContext, newMethodTypeResult,
59
+ /* useSpeculativeModeForArgs */ true);
60
+ if (newCallResult.argumentErrors) {
61
+ argumentErrors = true;
62
+ }
63
+ else {
64
+ overloadsUsedForCall.push(...newCallResult.overloadsUsedForCall);
65
+ }
66
+ if (newCallResult.isTypeIncomplete) {
67
+ isTypeIncomplete = true;
68
+ }
69
+ newMethodReturnType = newCallResult.returnType;
58
70
  }
59
- else {
60
- overloadsUsedForCall.push(...callResult.overloadsUsedForCall);
71
+ if (!newMethodReturnType) {
72
+ newMethodReturnType = types_1.ClassType.cloneAsInstance(type);
61
73
  }
62
- returnType = (_a = callResult.returnType) !== null && _a !== void 0 ? _a : types_1.UnknownType.create();
63
- }
64
- else {
65
- // Validate __init__
66
- // We validate __init__ before __new__ because the former typically has
67
- // more specific type annotations, and we want to evaluate the arguments
68
- // in the context of these types. The __new__ method often uses generic
69
- // vargs and kwargs.
70
- const initMethodType = initMethodInfo === null || initMethodInfo === void 0 ? void 0 : initMethodInfo.type;
71
- if (initMethodType && !shouldSkipConstructorCheck(initMethodType)) {
72
- // If there is an expected type, analyze the constructor call
73
- // for each of the subtypes that comprise the expected type. If
74
- // one or more analyzes with no errors, use those results.
75
- if (inferenceContext) {
76
- const expectedCallResult = validateConstructorMethodWithContext(evaluator, errorNode, argList, type, skipUnknownArgCheck, inferenceContext, initMethodType);
77
- if (expectedCallResult && !expectedCallResult.argumentErrors) {
78
- returnType = expectedCallResult.returnType;
79
- if (expectedCallResult.isTypeIncomplete) {
80
- isTypeIncomplete = true;
81
- }
82
- }
74
+ else if (!(0, types_1.isNever)(newMethodReturnType)) {
75
+ if (!(0, types_1.isClassInstance)(newMethodReturnType)) {
76
+ // If the __new__ method returns something other than an object or
77
+ // NoReturn, we'll ignore its return type.
78
+ newMethodReturnType = types_1.ClassType.cloneAsInstance(type);
83
79
  }
84
- if (!returnType) {
85
- const typeVarContext = type.typeArguments
86
- ? (0, typeUtils_1.buildTypeVarContextFromSpecializedClass)(type, /* makeConcrete */ false)
87
- : new typeVarContext_1.TypeVarContext((0, typeUtils_1.getTypeVarScopeId)(type));
88
- typeVarContext.addSolveForScope((0, typeUtils_1.getTypeVarScopeId)(initMethodType));
89
- const callResult = evaluator.validateCallArguments(errorNode, argList, { type: initMethodType }, typeVarContext, skipUnknownArgCheck);
90
- let adjustedClassType = type;
91
- if (callResult.specializedInitSelfType &&
92
- (0, types_1.isClassInstance)(callResult.specializedInitSelfType) &&
93
- types_1.ClassType.isSameGenericClass(callResult.specializedInitSelfType, type)) {
94
- adjustedClassType = types_1.ClassType.cloneAsInstantiable(callResult.specializedInitSelfType);
95
- }
96
- returnType = applyExpectedTypeForConstructor(evaluator, adjustedClassType,
97
- /* inferenceContext */ undefined, typeVarContext);
98
- if (callResult.isTypeIncomplete) {
99
- isTypeIncomplete = true;
100
- }
101
- if (callResult.argumentErrors) {
80
+ else if (types_1.ClassType.isSameGenericClass(newMethodReturnType, type) &&
81
+ (0, typeUtils_1.isPartlyUnknown)(newMethodReturnType)) {
82
+ // If the __new__ method returns the same type as the class it's constructing
83
+ // but doesn't supply solved type arguments, we'll ignore its return type
84
+ // and rely on the __init__ method to supply them instead.
85
+ newMethodReturnType = types_1.ClassType.cloneAsInstance(type);
86
+ }
87
+ }
88
+ let initMethodTypeResult;
89
+ // Validate __init__ if it's present. Skip if the __new__ method produced errors.
90
+ if (!argumentErrors &&
91
+ !(0, types_1.isNever)(newMethodReturnType) &&
92
+ !shouldSkipInitEvaluation(evaluator, type, newMethodReturnType)) {
93
+ // Determine whether the class overrides the object.__init__ method.
94
+ initMethodTypeResult = evaluator.getTypeOfObjectMember(errorNode, types_1.ClassType.cloneAsInstance(newMethodReturnType), '__init__', { method: 'get' },
95
+ /* diag */ undefined, 4 /* SkipObjectBaseClass */ | 64 /* SkipAttributeAccessOverride */);
96
+ // Validate __init__ if it's present.
97
+ if (initMethodTypeResult) {
98
+ const initCallResult = validateInitMethod(evaluator, errorNode, argList, newMethodReturnType, skipUnknownArgCheck, inferenceContext, initMethodTypeResult.type);
99
+ if (initCallResult.argumentErrors) {
102
100
  argumentErrors = true;
103
101
  }
104
102
  else {
105
- overloadsUsedForCall.push(...callResult.overloadsUsedForCall);
103
+ overloadsUsedForCall.push(...initCallResult.overloadsUsedForCall);
106
104
  }
107
- }
108
- validatedTypes = true;
109
- skipUnknownArgCheck = true;
110
- }
111
- // Validate __new__
112
- // Don't report errors for __new__ if __init__ already generated errors. They're
113
- // probably going to be entirely redundant anyway.
114
- if (!argumentErrors && newMethodInfo && !shouldSkipConstructorCheck(newMethodInfo.type)) {
115
- const constructorMethodType = newMethodInfo.type;
116
- let newReturnType;
117
- // If there is an expected type that was not applied above when
118
- // handling the __init__ method, try to apply it with the __new__ method.
119
- if (inferenceContext && !returnType) {
120
- const expectedCallResult = validateConstructorMethodWithContext(evaluator, errorNode, argList, type, skipUnknownArgCheck, inferenceContext, constructorMethodType);
121
- if (expectedCallResult && !expectedCallResult.argumentErrors) {
122
- newReturnType = expectedCallResult.returnType;
123
- returnType = newReturnType;
124
- if (expectedCallResult.isTypeIncomplete) {
125
- isTypeIncomplete = true;
126
- }
105
+ if (initCallResult.isTypeIncomplete) {
106
+ isTypeIncomplete = true;
127
107
  }
108
+ returnType = initCallResult.returnType;
109
+ validatedArgExpressions = true;
110
+ skipUnknownArgCheck = true;
128
111
  }
129
- const typeVarContext = new typeVarContext_1.TypeVarContext((0, typeUtils_1.getTypeVarScopeId)(type));
130
- if (type.typeAliasInfo) {
131
- typeVarContext.addSolveForScope(type.typeAliasInfo.typeVarScopeId);
132
- }
133
- typeVarContext.addSolveForScope((0, typeUtils_1.getTypeVarScopeId)(constructorMethodType));
134
- // Use speculative mode if we're going to later apply a constructor transform.
135
- // This allows us to use bidirectional type inference for arguments in the transform.
136
- const callResult = evaluator.useSpeculativeMode((0, constructorTransform_1.hasConstructorTransform)(type) ? errorNode : undefined, () => {
137
- return evaluator.validateCallArguments(errorNode, argList, newMethodInfo, typeVarContext, skipUnknownArgCheck);
138
- });
139
- if (callResult.isTypeIncomplete) {
140
- isTypeIncomplete = true;
112
+ }
113
+ if (!validatedArgExpressions && newMethodTypeResult) {
114
+ // If we skipped the __init__ method and the __new__ method was evaluated only
115
+ // speculatively, evaluate it non-speculatively now so we can report errors.
116
+ if (!evaluator.isSpeculativeModeInUse(errorNode)) {
117
+ validateNewMethod(evaluator, errorNode, argList, type, skipUnknownArgCheck, inferenceContext, newMethodTypeResult,
118
+ /* useSpeculativeModeForArgs */ false);
141
119
  }
120
+ validatedArgExpressions = true;
121
+ returnType = newMethodReturnType;
122
+ }
123
+ // If the class doesn't override object.__new__ or object.__init__, use the
124
+ // fallback constructor type evaluation for the `object` class.
125
+ if (!newMethodTypeResult && !initMethodTypeResult) {
126
+ const callResult = validateFallbackConstructorCall(evaluator, errorNode, argList, type, inferenceContext);
142
127
  if (callResult.argumentErrors) {
143
128
  argumentErrors = true;
144
129
  }
145
- else if (!newReturnType) {
146
- newReturnType = callResult.returnType;
147
- if (overloadsUsedForCall.length === 0) {
148
- overloadsUsedForCall.push(...callResult.overloadsUsedForCall);
149
- }
150
- // If the constructor returned an object whose type matches the class of
151
- // the original type being constructed, use the return type in case it was
152
- // specialized. If it doesn't match, we'll fall back on the assumption that
153
- // the constructed type is an instance of the class type. We need to do this
154
- // in cases where we're inferring the return type based on a call to
155
- // super().__new__().
156
- if (newReturnType) {
157
- if ((0, types_1.isClassInstance)(newReturnType) && types_1.ClassType.isSameGenericClass(newReturnType, type)) {
158
- // If the specialized return type derived from the __init__
159
- // method is "better" than the return type provided by the
160
- // __new__ method (where "better" means that the type arguments
161
- // are all known), stick with the __init__ result.
162
- if ((!(0, typeUtils_1.isPartlyUnknown)(newReturnType) && !(0, typeUtils_1.requiresSpecialization)(newReturnType)) ||
163
- returnType === undefined) {
164
- // Special-case the 'tuple' type specialization to use
165
- // the homogenous arbitrary-length form.
166
- if ((0, types_1.isClassInstance)(newReturnType) &&
167
- types_1.ClassType.isTupleClass(newReturnType) &&
168
- !newReturnType.tupleTypeArguments &&
169
- newReturnType.typeArguments &&
170
- newReturnType.typeArguments.length === 1) {
171
- newReturnType = (0, typeUtils_1.specializeTupleClass)(newReturnType, [
172
- { type: newReturnType.typeArguments[0], isUnbounded: true },
173
- ]);
174
- }
175
- returnType = newReturnType;
176
- }
177
- }
178
- else if (!returnType && !(0, types_1.isUnknown)(newReturnType)) {
179
- returnType = newReturnType;
180
- }
181
- }
182
- }
183
- if (!returnType) {
184
- returnType = applyExpectedTypeForConstructor(evaluator, type, inferenceContext, typeVarContext);
130
+ else {
131
+ overloadsUsedForCall.push(...callResult.overloadsUsedForCall);
185
132
  }
186
- else if ((0, types_1.isClassInstance)(returnType) && (0, typeUtils_1.isTupleClass)(returnType) && !returnType.tupleTypeArguments) {
187
- returnType = applyExpectedTypeForTupleConstructor(returnType, inferenceContext);
133
+ if (callResult.isTypeIncomplete) {
134
+ isTypeIncomplete = true;
188
135
  }
189
- validatedTypes = true;
136
+ returnType = (_a = callResult.returnType) !== null && _a !== void 0 ? _a : types_1.UnknownType.create();
190
137
  }
191
- }
192
- // If we weren't able to validate the args, analyze the expressions here
193
- // to mark symbols referenced and report expression evaluation errors.
194
- if (!validatedTypes) {
195
- argList.forEach((arg) => {
196
- if (arg.valueExpression && !evaluator.isSpeculativeModeInUse(arg.valueExpression)) {
197
- evaluator.getTypeOfExpression(arg.valueExpression);
198
- }
199
- });
200
- }
138
+ });
201
139
  // Apply a constructor transform if applicable.
202
- if (!argumentErrors && returnType) {
140
+ if (!argumentErrors && returnType && useConstructorTransform) {
203
141
  const transformed = (0, constructorTransform_1.applyConstructorTransform)(evaluator, errorNode, argList, type, {
204
142
  argumentErrors,
205
143
  returnType,
@@ -212,10 +150,152 @@ function validateConstructorArguments(evaluator, errorNode, argList, type, skipU
212
150
  if (transformed.argumentErrors) {
213
151
  argumentErrors = true;
214
152
  }
153
+ validatedArgExpressions = true;
154
+ }
155
+ // If we weren't able to validate the args, analyze the expressions here
156
+ // to mark symbols referenced and report expression evaluation errors.
157
+ if (!validatedArgExpressions) {
158
+ argList.forEach((arg) => {
159
+ if (arg.valueExpression && !evaluator.isSpeculativeModeInUse(arg.valueExpression)) {
160
+ evaluator.getTypeOfExpression(arg.valueExpression);
161
+ }
162
+ });
215
163
  }
216
164
  return { argumentErrors, returnType, isTypeIncomplete, overloadsUsedForCall };
217
165
  }
218
166
  exports.validateConstructorArguments = validateConstructorArguments;
167
+ // Evaluates the __new__ method for type correctness. If useSpeculativeModeForArgs
168
+ // is true, use speculative mode to evaluate the arguments (unless an argument
169
+ // error is produced, in which case it's OK to use speculative mode).
170
+ function validateNewMethod(evaluator, errorNode, argList, type, skipUnknownArgCheck, inferenceContext, newMethodTypeResult, useSpeculativeModeForArgs) {
171
+ let newReturnType;
172
+ let isTypeIncomplete = false;
173
+ let argumentErrors = false;
174
+ const overloadsUsedForCall = [];
175
+ const typeVarContext = new typeVarContext_1.TypeVarContext((0, typeUtils_1.getTypeVarScopeId)(type));
176
+ typeVarContext.addSolveForScope((0, typeUtils_1.getTypeVarScopeId)(newMethodTypeResult.type));
177
+ if (type.typeAliasInfo) {
178
+ typeVarContext.addSolveForScope(type.typeAliasInfo.typeVarScopeId);
179
+ }
180
+ const callResult = evaluator.useSpeculativeMode(useSpeculativeModeForArgs ? errorNode : undefined, () => {
181
+ return evaluator.validateCallArguments(errorNode, argList, newMethodTypeResult, typeVarContext, skipUnknownArgCheck, inferenceContext);
182
+ });
183
+ if (callResult.isTypeIncomplete) {
184
+ isTypeIncomplete = true;
185
+ }
186
+ if (callResult.argumentErrors) {
187
+ argumentErrors = true;
188
+ // Evaluate the arguments in a non-speculative manner to generate any diagnostics.
189
+ evaluator.validateCallArguments(errorNode, argList, newMethodTypeResult, typeVarContext, skipUnknownArgCheck);
190
+ }
191
+ else {
192
+ newReturnType = callResult.returnType;
193
+ if (overloadsUsedForCall.length === 0) {
194
+ overloadsUsedForCall.push(...callResult.overloadsUsedForCall);
195
+ }
196
+ // If the constructor returned an object whose type matches the class of
197
+ // the original type being constructed, use the return type in case it was
198
+ // specialized. If it doesn't match, we'll fall back on the assumption that
199
+ // the constructed type is an instance of the class type. We need to do this
200
+ // in cases where we're inferring the return type based on a call to
201
+ // super().__new__().
202
+ if (newReturnType) {
203
+ if ((0, types_1.isClassInstance)(newReturnType) && types_1.ClassType.isSameGenericClass(newReturnType, type)) {
204
+ // If the specialized return type derived from the __init__
205
+ // method is "better" than the return type provided by the
206
+ // __new__ method (where "better" means that the type arguments
207
+ // are all known), stick with the __init__ result.
208
+ if (!(0, typeUtils_1.isPartlyUnknown)(newReturnType) && !(0, typeUtils_1.requiresSpecialization)(newReturnType)) {
209
+ // Special-case the 'tuple' type specialization to use
210
+ // the homogenous arbitrary-length form.
211
+ if ((0, types_1.isClassInstance)(newReturnType) &&
212
+ types_1.ClassType.isTupleClass(newReturnType) &&
213
+ !newReturnType.tupleTypeArguments &&
214
+ newReturnType.typeArguments &&
215
+ newReturnType.typeArguments.length === 1) {
216
+ newReturnType = (0, typeUtils_1.specializeTupleClass)(newReturnType, [
217
+ { type: newReturnType.typeArguments[0], isUnbounded: true },
218
+ ]);
219
+ }
220
+ }
221
+ }
222
+ }
223
+ }
224
+ if (!newReturnType) {
225
+ newReturnType = applyExpectedTypeForConstructor(evaluator, type, inferenceContext, typeVarContext);
226
+ }
227
+ else if ((0, types_1.isClassInstance)(newReturnType) && (0, typeUtils_1.isTupleClass)(newReturnType) && !newReturnType.tupleTypeArguments) {
228
+ newReturnType = applyExpectedTypeForTupleConstructor(newReturnType, inferenceContext);
229
+ }
230
+ return { argumentErrors, returnType: newReturnType, isTypeIncomplete, overloadsUsedForCall };
231
+ }
232
+ function validateInitMethod(evaluator, errorNode, argList, type, skipUnknownArgCheck, inferenceContext, initMethodType) {
233
+ let returnType;
234
+ let isTypeIncomplete = false;
235
+ let argumentErrors = false;
236
+ const overloadsUsedForCall = [];
237
+ // If there is an expected type, analyze the __init__ call for each of the
238
+ // subtypes that comprise the expected type. If one or more analyzes with no
239
+ // errors, use those results. This requires special-case processing because
240
+ // the __init__ method doesn't return the expected type. It always
241
+ // returns None.
242
+ if (inferenceContext) {
243
+ returnType = (0, typeUtils_1.mapSubtypes)(inferenceContext.expectedType, (expectedSubType) => {
244
+ expectedSubType = (0, typeUtils_1.transformPossibleRecursiveTypeAlias)(expectedSubType);
245
+ const typeVarContext = new typeVarContext_1.TypeVarContext((0, typeUtils_1.getTypeVarScopeId)(type));
246
+ typeVarContext.addSolveForScope((0, typeUtils_1.getTypeVarScopeId)(initMethodType));
247
+ if ((0, constraintSolver_1.populateTypeVarContextBasedOnExpectedType)(evaluator, types_1.ClassType.cloneAsInstance(type), expectedSubType, typeVarContext, (0, parseTreeUtils_1.getTypeVarScopesForNode)(errorNode))) {
248
+ const specializedConstructor = (0, typeUtils_1.applySolvedTypeVars)(initMethodType, typeVarContext);
249
+ let callResult;
250
+ callResult = evaluator.useSpeculativeMode(errorNode, () => {
251
+ return evaluator.validateCallArguments(errorNode, argList, { type: specializedConstructor }, typeVarContext.clone(), skipUnknownArgCheck);
252
+ });
253
+ if (!callResult.argumentErrors) {
254
+ // Call validateCallArguments again, this time without speculative
255
+ // mode, so any errors are reported.
256
+ callResult = evaluator.validateCallArguments(errorNode, argList, { type: specializedConstructor }, typeVarContext, skipUnknownArgCheck);
257
+ if (callResult.isTypeIncomplete) {
258
+ isTypeIncomplete = true;
259
+ }
260
+ if (callResult.argumentErrors) {
261
+ argumentErrors = true;
262
+ }
263
+ overloadsUsedForCall.push(...callResult.overloadsUsedForCall);
264
+ return applyExpectedSubtypeForConstructor(evaluator, type, expectedSubType, typeVarContext);
265
+ }
266
+ }
267
+ return undefined;
268
+ });
269
+ if ((0, types_1.isNever)(returnType) || argumentErrors) {
270
+ returnType = undefined;
271
+ }
272
+ }
273
+ if (!returnType) {
274
+ const typeVarContext = type.typeArguments
275
+ ? (0, typeUtils_1.buildTypeVarContextFromSpecializedClass)(type, /* makeConcrete */ false)
276
+ : new typeVarContext_1.TypeVarContext((0, typeUtils_1.getTypeVarScopeId)(type));
277
+ typeVarContext.addSolveForScope((0, typeUtils_1.getTypeVarScopeId)(initMethodType));
278
+ const callResult = evaluator.validateCallArguments(errorNode, argList, { type: initMethodType }, typeVarContext, skipUnknownArgCheck);
279
+ let adjustedClassType = type;
280
+ if (callResult.specializedInitSelfType &&
281
+ (0, types_1.isClassInstance)(callResult.specializedInitSelfType) &&
282
+ types_1.ClassType.isSameGenericClass(callResult.specializedInitSelfType, adjustedClassType)) {
283
+ adjustedClassType = types_1.ClassType.cloneAsInstantiable(callResult.specializedInitSelfType);
284
+ }
285
+ returnType = applyExpectedTypeForConstructor(evaluator, adjustedClassType,
286
+ /* inferenceContext */ undefined, typeVarContext);
287
+ if (callResult.isTypeIncomplete) {
288
+ isTypeIncomplete = true;
289
+ }
290
+ if (callResult.argumentErrors) {
291
+ argumentErrors = true;
292
+ }
293
+ else {
294
+ overloadsUsedForCall.push(...callResult.overloadsUsedForCall);
295
+ }
296
+ }
297
+ return { argumentErrors, returnType, isTypeIncomplete, overloadsUsedForCall };
298
+ }
219
299
  function validateFallbackConstructorCall(evaluator, errorNode, argList, type, inferenceContext) {
220
300
  let reportedErrors = false;
221
301
  if (argList.length > 0) {
@@ -267,51 +347,11 @@ function validateMetaclassCall(evaluator, errorNode, argList, type, skipUnknownA
267
347
  }
268
348
  return undefined;
269
349
  }
270
- // For a constructor call that targets a generic class and an "expected type"
271
- // (i.e. bidirectional inference), this function attempts to infer the correct
272
- // specialized return type for the constructor.
273
- function validateConstructorMethodWithContext(evaluator, errorNode, argList, type, skipUnknownArgCheck, inferenceContext, constructorMethodType) {
274
- let isTypeIncomplete = false;
275
- let argumentErrors = false;
276
- const overloadsUsedForCall = [];
277
- const returnType = (0, typeUtils_1.mapSubtypes)(inferenceContext.expectedType, (expectedSubType) => {
278
- expectedSubType = (0, typeUtils_1.transformPossibleRecursiveTypeAlias)(expectedSubType);
279
- const typeVarContext = new typeVarContext_1.TypeVarContext((0, typeUtils_1.getTypeVarScopeId)(type));
280
- typeVarContext.addSolveForScope((0, typeUtils_1.getTypeVarScopeId)(constructorMethodType));
281
- if ((0, constraintSolver_1.populateTypeVarContextBasedOnExpectedType)(evaluator, types_1.ClassType.cloneAsInstance(type), expectedSubType, typeVarContext, (0, parseTreeUtils_1.getTypeVarScopesForNode)(errorNode))) {
282
- const specializedConstructor = (0, typeUtils_1.applySolvedTypeVars)(constructorMethodType, typeVarContext);
283
- let callResult;
284
- evaluator.useSpeculativeMode(errorNode, () => {
285
- callResult = evaluator.validateCallArguments(errorNode, argList, { type: specializedConstructor }, typeVarContext.clone(), skipUnknownArgCheck);
286
- });
287
- if (!callResult.argumentErrors) {
288
- // Call validateCallArguments again, this time without speculative
289
- // mode, so any errors are reported.
290
- callResult = evaluator.validateCallArguments(errorNode, argList, { type: specializedConstructor }, typeVarContext, skipUnknownArgCheck);
291
- if (callResult.isTypeIncomplete) {
292
- isTypeIncomplete = true;
293
- }
294
- if (callResult.argumentErrors) {
295
- argumentErrors = true;
296
- }
297
- overloadsUsedForCall.push(...callResult.overloadsUsedForCall);
298
- return applyExpectedSubtypeForConstructor(evaluator, type, expectedSubType, inferenceContext, typeVarContext);
299
- }
300
- }
301
- return undefined;
350
+ function applyExpectedSubtypeForConstructor(evaluator, type, expectedSubtype, typeVarContext) {
351
+ const specializedType = (0, typeUtils_1.applySolvedTypeVars)(types_1.ClassType.cloneAsInstance(type), typeVarContext, {
352
+ applyInScopePlaceholders: true,
302
353
  });
303
- if ((0, types_1.isNever)(returnType)) {
304
- return undefined;
305
- }
306
- return { returnType, isTypeIncomplete, argumentErrors, overloadsUsedForCall };
307
- }
308
- function applyExpectedSubtypeForConstructor(evaluator, type, expectedSubtype, inferenceContext, typeVarContext) {
309
- var _a;
310
- const specializedType = (0, typeUtils_1.applySolvedTypeVars)(types_1.ClassType.cloneAsInstance(type), typeVarContext);
311
- if (!evaluator.assignType(expectedSubtype, specializedType,
312
- /* diag */ undefined,
313
- /* destTypeVarContext */ (_a = inferenceContext === null || inferenceContext === void 0 ? void 0 : inferenceContext.typeVarContext) === null || _a === void 0 ? void 0 : _a.clone(),
314
- /* srcTypeVarContext */ undefined)) {
354
+ if (!evaluator.assignType(expectedSubtype, specializedType)) {
315
355
  return undefined;
316
356
  }
317
357
  // If the expected type is "Any", transform it to an Any.
@@ -326,7 +366,7 @@ function applyExpectedTypeForConstructor(evaluator, type, inferenceContext, type
326
366
  let unsolvedTypeVarsAreUnknown = true;
327
367
  if (inferenceContext) {
328
368
  const specializedExpectedType = (0, typeUtils_1.mapSubtypes)(inferenceContext.expectedType, (expectedSubtype) => {
329
- return applyExpectedSubtypeForConstructor(evaluator, type, expectedSubtype, inferenceContext, typeVarContext);
369
+ return applyExpectedSubtypeForConstructor(evaluator, type, expectedSubtype, typeVarContext);
330
370
  });
331
371
  if (!(0, types_1.isNever)(specializedExpectedType)) {
332
372
  return specializedExpectedType;
@@ -448,9 +488,26 @@ function createFunctionFromConstructor(evaluator, classType, recursionCount = 0)
448
488
  return constructorFunction;
449
489
  }
450
490
  exports.createFunctionFromConstructor = createFunctionFromConstructor;
451
- // Determines whether we should skip argument validation. This is required
452
- // for certain synthesized constructor types, namely NamedTuples.
453
- function shouldSkipConstructorCheck(type) {
454
- return (0, types_1.isFunction)(type) && types_1.FunctionType.isSkipConstructorCheck(type);
491
+ // If __new__ returns a type that is not an instance of the class, skip the
492
+ // __init__ method evaluation. This is consistent with the behavior of the
493
+ // type.__call__ runtime behavior.
494
+ function shouldSkipInitEvaluation(evaluator, classType, newMethodReturnType) {
495
+ const returnType = evaluator.makeTopLevelTypeVarsConcrete(newMethodReturnType);
496
+ let skipInitCheck = false;
497
+ (0, typeUtils_1.doForEachSubtype)(returnType, (subtype) => {
498
+ if ((0, types_1.isAnyOrUnknown)(subtype)) {
499
+ return;
500
+ }
501
+ if ((0, types_1.isClassInstance)(subtype)) {
502
+ const inheritanceChain = [];
503
+ const isDerivedFrom = types_1.ClassType.isDerivedFrom(subtype, classType, inheritanceChain);
504
+ if (!isDerivedFrom) {
505
+ skipInitCheck = true;
506
+ }
507
+ return;
508
+ }
509
+ skipInitCheck = true;
510
+ });
511
+ return skipInitCheck;
455
512
  }
456
513
  //# sourceMappingURL=constructors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constructors.js","sourceRoot":"","sources":["../../../src/analyzer/constructors.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAEH,+DAA2D;AAC3D,uDAAqD;AAErD,yDAAiD;AACjD,yDAA+E;AAC/E,iEAA4F;AAC5F,qDAA2D;AAE3D,2CAcqB;AACrB,qDAAkD;AAClD,mCAciB;AAEjB,kEAAkE;AAClE,yEAAyE;AACzE,4EAA4E;AAC5E,SAAgB,4BAA4B,CACxC,SAAwB,EACxB,SAAyB,EACzB,OAA2B,EAC3B,IAAe,EACf,mBAA4B,EAC5B,gBAA8C;;IAE9C,uEAAuE;IACvE,yEAAyE;IACzE,mCAAmC;IACnC,MAAM,eAAe,GAAG,qBAAqB,CACzC,SAAS,EACT,SAAS,EACT,OAAO,EACP,IAAI,EACJ,mBAAmB,EACnB,gBAAgB,CACnB,CAAC;IACF,IAAI,eAAe,EAAE;QACjB,OAAO,eAAe,CAAC;KAC1B;IAED,mEAAmE;IACnE,MAAM,aAAa,GAAG,SAAS,CAAC,wBAAwB,CACpD,SAAS,EACT,IAAI;IACJ,6BAA6B,CAAC,KAAK,EACnC,SAAS,EACT,EAAE,MAAM,EAAE,KAAK,EAAE;IACjB,UAAU,CAAC,SAAS,EACpB;mCACyC;8CACU,EACnD,IAAI,CACP,CAAC;IAEF,oEAAoE;IACpE,MAAM,cAAc,GAAG,SAAS,CAAC,qBAAqB,CAClD,SAAS,EACT,iBAAS,CAAC,eAAe,CAAC,IAAI,CAAC,EAC/B,UAAU,EACV,EAAE,MA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C,IAAU;IAC1C,OAAO,IAAA,kBAAU,EAAC,IAAI,CAAC,IAAI,oBAAY,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;AACzE,CAAC"}
1
+ {"version":3,"file":"constructors.js","sourceRoot":"","sources":["../../../src/analyzer/constructors.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAEH,+DAA2D;AAC3D,uDAAqD;AAErD,yDAAiD;AACjD,yDAA+E;AAC/E,iEAA4F;AAC5F,qDAA2D;AAE3D,2CAeqB;AACrB,qDAAkD;AAClD,mCAgBiB;AAEjB,kEAAkE;AAClE,yEAAyE;AACzE,4EAA4E;AAC5E,SAAgB,4BAA4B,CACxC,SAAwB,EACxB,SAAyB,EACzB,OAA2B,EAC3B,IAAe,EACf,mBAA4B,EAC5B,gBAA8C;IAE9C,uEAAuE;IACvE,yEAAyE;IACzE,mCAAmC;IACnC,MAAM,eAAe,GAAG,qBAAqB,CACzC,SAAS,EACT,SAAS,EACT,OAAO,EACP,IAAI,EACJ,mBAAmB,EACnB,gBAAgB,CACnB,CAAC;IACF,IAAI,eAAe,EAAE;QACjB,OAAO,eAAe,CAAC;KAC1B;IAED,mEAAmE;IACnE,MAAM,mBAAmB,GAAG,SAAS,CAAC,wBAAwB,CAC1D,SAAS,EACT,IAAI;IACJ,6BAA6B,CAAC,KAAK,EACnC,SAAS,EACT,EAAE,MAAM,EAAE,KAAK,EAAE;IACjB,UAAU,CAAC,SAAS,EACpB;mCACyC;8CACU,EACnD,IAAI,CACP,CAAC;IAEF,IAAI,UAA4B,CAAC;IACjC,IAAI,uBAAuB,GAAG,KAAK,CAAC;IACpC,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,IAAI,gBAAgB,GAAG,KAAK,CAAC;IAC7B,MAAM,oBAAoB,GAAmB,EAAE,CAAC;IAChD,IAAI,mBAAqC,CAAC;IAC1C,MAAM,uBAAuB,GAAG,IAAA,8CAAuB,EAAC,IAAI,CAAC,CAAC;IAE9D,4EAA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C,SAAS,wBAAwB,CAAC,SAAwB,EAAE,SAAoB,EAAE,mBAAyB;IACvG,MAAM,UAAU,GAAG,SAAS,CAAC,4BAA4B,CAAC,mBAAmB,CAAC,CAAC;IAE/E,IAAI,aAAa,GAAG,KAAK,CAAC;IAC1B,IAAA,4BAAgB,EAAC,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE;QACrC,IAAI,IAAA,sBAAc,EAAC,OAAO,CAAC,EAAE;YACzB,OAAO;SACV;QAED,IAAI,IAAA,uBAAe,EAAC,OAAO,CAAC,EAAE;YAC1B,MAAM,gBAAgB,GAAqB,EAAE,CAAC;YAC9C,MAAM,aAAa,GAAG,iBAAS,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC;YAEpF,IAAI,CAAC,aAAa,EAAE;gBAChB,aAAa,GAAG,IAAI,CAAC;aACxB;YAED,OAAO;SACV;QAED,aAAa,GAAG,IAAI,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,OAAO,aAAa,CAAC;AACzB,CAAC"}
@@ -472,10 +472,10 @@ function synthesizeDataClassMethods(evaluator, node, classType, skipSynthesizeIn
472
472
  const hashMethod = types_1.FunctionType.createSynthesizedInstance('__hash__');
473
473
  types_1.FunctionType.addParameter(hashMethod, selfParam);
474
474
  hashMethod.details.declaredReturnType = evaluator.getBuiltInObject(node, 'int');
475
- symbolTable.set('__hash__', symbol_1.Symbol.createWithType(4 /* ClassMember */, hashMethod));
475
+ symbolTable.set('__hash__', symbol_1.Symbol.createWithType(4 /* ClassMember */ | 4096 /* IgnoredForOverrideChecks */, hashMethod));
476
476
  }
477
477
  else if (synthesizeHashNone && !skipSynthesizeHash) {
478
- symbolTable.set('__hash__', symbol_1.Symbol.createWithType(4 /* ClassMember */, types_1.NoneType.createInstance()));
478
+ symbolTable.set('__hash__', symbol_1.Symbol.createWithType(4 /* ClassMember */ | 4096 /* IgnoredForOverrideChecks */, types_1.NoneType.createInstance()));
479
479
  }
480
480
  let dictType = evaluator.getBuiltInType(node, 'dict');
481
481
  if ((0, types_1.isInstantiableClass)(dictType)) {