@zzzen/pyright-internal 1.2.0-dev.20230129 → 1.2.0-dev.20230212

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 (237) hide show
  1. package/dist/analyzer/backgroundAnalysisProgram.d.ts +3 -3
  2. package/dist/analyzer/backgroundAnalysisProgram.js +4 -2
  3. package/dist/analyzer/backgroundAnalysisProgram.js.map +1 -1
  4. package/dist/analyzer/binder.js +15 -11
  5. package/dist/analyzer/binder.js.map +1 -1
  6. package/dist/analyzer/checker.d.ts +2 -1
  7. package/dist/analyzer/checker.js +28 -21
  8. package/dist/analyzer/checker.js.map +1 -1
  9. package/dist/analyzer/codeFlowEngine.js +3 -2
  10. package/dist/analyzer/codeFlowEngine.js.map +1 -1
  11. package/dist/analyzer/constraintSolver.js +83 -67
  12. package/dist/analyzer/constraintSolver.js.map +1 -1
  13. package/dist/analyzer/dataClasses.js +13 -5
  14. package/dist/analyzer/dataClasses.js.map +1 -1
  15. package/dist/analyzer/declaration.d.ts +2 -0
  16. package/dist/analyzer/declaration.js.map +1 -1
  17. package/dist/analyzer/importResolver.d.ts +1 -1
  18. package/dist/analyzer/importResolver.js +6 -3
  19. package/dist/analyzer/importResolver.js.map +1 -1
  20. package/dist/analyzer/parameterUtils.d.ts +2 -0
  21. package/dist/analyzer/parameterUtils.js +20 -0
  22. package/dist/analyzer/parameterUtils.js.map +1 -0
  23. package/dist/analyzer/parseTreeUtils.d.ts +3 -1
  24. package/dist/analyzer/parseTreeUtils.js +54 -12
  25. package/dist/analyzer/parseTreeUtils.js.map +1 -1
  26. package/dist/analyzer/parseTreeWalker.d.ts +1 -1
  27. package/dist/analyzer/program.d.ts +6 -3
  28. package/dist/analyzer/program.js +78 -19
  29. package/dist/analyzer/program.js.map +1 -1
  30. package/dist/analyzer/service.d.ts +0 -2
  31. package/dist/analyzer/service.js +8 -8
  32. package/dist/analyzer/service.js.map +1 -1
  33. package/dist/analyzer/sourceFile.d.ts +3 -7
  34. package/dist/analyzer/sourceFile.js +3 -19
  35. package/dist/analyzer/sourceFile.js.map +1 -1
  36. package/dist/analyzer/testWalker.js +23 -15
  37. package/dist/analyzer/testWalker.js.map +1 -1
  38. package/dist/analyzer/typeCacheUtils.d.ts +8 -2
  39. package/dist/analyzer/typeCacheUtils.js +4 -4
  40. package/dist/analyzer/typeCacheUtils.js.map +1 -1
  41. package/dist/analyzer/typeEvaluator.js +283 -160
  42. package/dist/analyzer/typeEvaluator.js.map +1 -1
  43. package/dist/analyzer/typeEvaluatorTypes.d.ts +14 -9
  44. package/dist/analyzer/typeEvaluatorTypes.js.map +1 -1
  45. package/dist/analyzer/typeGuards.js +0 -14
  46. package/dist/analyzer/typeGuards.js.map +1 -1
  47. package/dist/analyzer/typePrinter.d.ts +2 -1
  48. package/dist/analyzer/typePrinter.js +13 -0
  49. package/dist/analyzer/typePrinter.js.map +1 -1
  50. package/dist/analyzer/typeUtils.d.ts +5 -4
  51. package/dist/analyzer/typeUtils.js +191 -144
  52. package/dist/analyzer/typeUtils.js.map +1 -1
  53. package/dist/analyzer/typeVarContext.d.ts +32 -19
  54. package/dist/analyzer/typeVarContext.js +173 -99
  55. package/dist/analyzer/typeVarContext.js.map +1 -1
  56. package/dist/analyzer/types.d.ts +2 -1
  57. package/dist/analyzer/types.js +1 -0
  58. package/dist/analyzer/types.js.map +1 -1
  59. package/dist/backgroundAnalysisBase.d.ts +1 -3
  60. package/dist/backgroundAnalysisBase.js +2 -3
  61. package/dist/backgroundAnalysisBase.js.map +1 -1
  62. package/dist/backgroundThreadBase.js +5 -1
  63. package/dist/backgroundThreadBase.js.map +1 -1
  64. package/dist/common/envVarUtils.d.ts +1 -1
  65. package/dist/common/envVarUtils.js +26 -16
  66. package/dist/common/envVarUtils.js.map +1 -1
  67. package/dist/common/extensibility.d.ts +44 -6
  68. package/dist/common/extensibility.js +26 -2
  69. package/dist/common/extensibility.js.map +1 -1
  70. package/dist/common/fullAccessHost.d.ts +2 -1
  71. package/dist/common/fullAccessHost.js +22 -0
  72. package/dist/common/fullAccessHost.js.map +1 -1
  73. package/dist/common/host.d.ts +6 -0
  74. package/dist/common/host.js +3 -0
  75. package/dist/common/host.js.map +1 -1
  76. package/dist/common/pathUtils.d.ts +2 -0
  77. package/dist/common/pathUtils.js +17 -3
  78. package/dist/common/pathUtils.js.map +1 -1
  79. package/dist/common/textRangeCollection.d.ts +1 -0
  80. package/dist/common/textRangeCollection.js +54 -20
  81. package/dist/common/textRangeCollection.js.map +1 -1
  82. package/dist/languageServerBase.d.ts +2 -4
  83. package/dist/languageServerBase.js +5 -6
  84. package/dist/languageServerBase.js.map +1 -1
  85. package/dist/languageService/callHierarchyProvider.js +1 -1
  86. package/dist/languageService/callHierarchyProvider.js.map +1 -1
  87. package/dist/languageService/completionProvider.d.ts +0 -1
  88. package/dist/languageService/completionProvider.js +33 -98
  89. package/dist/languageService/completionProvider.js.map +1 -1
  90. package/dist/languageService/completionProviderUtils.d.ts +34 -0
  91. package/dist/languageService/completionProviderUtils.js +102 -0
  92. package/dist/languageService/completionProviderUtils.js.map +1 -0
  93. package/dist/languageService/definitionProvider.d.ts +2 -1
  94. package/dist/languageService/definitionProvider.js +25 -9
  95. package/dist/languageService/definitionProvider.js.map +1 -1
  96. package/dist/languageService/documentSymbolCollector.d.ts +2 -1
  97. package/dist/languageService/documentSymbolCollector.js +27 -3
  98. package/dist/languageService/documentSymbolCollector.js.map +1 -1
  99. package/dist/languageService/documentSymbolProvider.js +1 -1
  100. package/dist/languageService/documentSymbolProvider.js.map +1 -1
  101. package/dist/languageService/hoverProvider.d.ts +1 -0
  102. package/dist/languageService/hoverProvider.js +44 -10
  103. package/dist/languageService/hoverProvider.js.map +1 -1
  104. package/dist/languageService/referencesProvider.d.ts +2 -1
  105. package/dist/languageService/referencesProvider.js +4 -3
  106. package/dist/languageService/referencesProvider.js.map +1 -1
  107. package/dist/languageService/signatureHelpProvider.js +20 -3
  108. package/dist/languageService/signatureHelpProvider.js.map +1 -1
  109. package/dist/languageService/tooltipUtils.d.ts +3 -1
  110. package/dist/languageService/tooltipUtils.js +30 -10
  111. package/dist/languageService/tooltipUtils.js.map +1 -1
  112. package/dist/localization/localize.d.ts +8 -1
  113. package/dist/localization/localize.js +10 -10
  114. package/dist/localization/localize.js.map +1 -1
  115. package/dist/localization/package.nls.en-us.json +3 -3
  116. package/dist/parser/stringTokenUtils.js +10 -0
  117. package/dist/parser/stringTokenUtils.js.map +1 -1
  118. package/dist/pyright.js +17 -9
  119. package/dist/pyright.js.map +1 -1
  120. package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js +1 -1
  121. package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js.map +1 -1
  122. package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js +5 -5
  123. package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js.map +1 -1
  124. package/dist/tests/fourslash/completions.fourslash.js +2 -2
  125. package/dist/tests/fourslash/completions.fourslash.js.map +1 -1
  126. package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js +1 -1
  127. package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js.map +1 -1
  128. package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js +1 -1
  129. package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js.map +1 -1
  130. package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js +1 -1
  131. package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js.map +1 -1
  132. package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js +1 -1
  133. package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js.map +1 -1
  134. package/dist/tests/fourslash/completions.libStub.fourslash.js +1 -1
  135. package/dist/tests/fourslash/completions.libStub.fourslash.js.map +1 -1
  136. package/dist/tests/fourslash/completions.localCode.fourslash.js +2 -2
  137. package/dist/tests/fourslash/completions.localCode.fourslash.js.map +1 -1
  138. package/dist/tests/fourslash/completions.overloads.fourslash.js +1 -1
  139. package/dist/tests/fourslash/completions.overloads.fourslash.js.map +1 -1
  140. package/dist/tests/fourslash/completions.params.fourslash.js +37 -0
  141. package/dist/tests/fourslash/completions.params.fourslash.js.map +1 -1
  142. package/dist/tests/fourslash/completions.plainText.fourslash.js +2 -2
  143. package/dist/tests/fourslash/completions.plainText.fourslash.js.map +1 -1
  144. package/dist/tests/fourslash/completions.self.fourslash.js +2 -2
  145. package/dist/tests/fourslash/completions.self.fourslash.js.map +1 -1
  146. package/dist/tests/fourslash/completions.wildcardimports.fourslash.js +1 -1
  147. package/dist/tests/fourslash/completions.wildcardimports.fourslash.js.map +1 -1
  148. package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js +7 -7
  149. package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js.map +1 -1
  150. package/dist/tests/fourslash/hover.class.docString.fourslash.js +1 -1
  151. package/dist/tests/fourslash/hover.class.docString.fourslash.js.map +1 -1
  152. package/dist/tests/fourslash/hover.classNoInit.fourslash.js +1 -1
  153. package/dist/tests/fourslash/hover.classNoInit.fourslash.js.map +1 -1
  154. package/dist/tests/fourslash/hover.docFromSrc.fourslash.js +7 -7
  155. package/dist/tests/fourslash/hover.docFromSrc.fourslash.js.map +1 -1
  156. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js +1 -1
  157. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js.map +1 -1
  158. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js +1 -1
  159. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js.map +1 -1
  160. package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js +1 -1
  161. package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js.map +1 -1
  162. package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js +1 -1
  163. package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js.map +1 -1
  164. package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js +1 -1
  165. package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js.map +1 -1
  166. package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js +2 -2
  167. package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js.map +1 -1
  168. package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js +1 -1
  169. package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js.map +1 -1
  170. package/dist/tests/fourslash/hover.docstring.links.fourslash.js +1 -1
  171. package/dist/tests/fourslash/hover.docstring.links.fourslash.js.map +1 -1
  172. package/dist/tests/fourslash/hover.docstring.split.fourslash.js +3 -3
  173. package/dist/tests/fourslash/hover.docstring.split.fourslash.js.map +1 -1
  174. package/dist/tests/fourslash/hover.dunderNew.basic.fourslash.js +1 -1
  175. package/dist/tests/fourslash/hover.dunderNew.basic.fourslash.js.map +1 -1
  176. package/dist/tests/fourslash/hover.dunderNew.inheritance.fourslash.js +1 -1
  177. package/dist/tests/fourslash/hover.dunderNew.inheritance.fourslash.js.map +1 -1
  178. package/dist/tests/fourslash/hover.dunderNew.inheritance2.fourslash.js +1 -1
  179. package/dist/tests/fourslash/hover.dunderNew.inheritance2.fourslash.js.map +1 -1
  180. package/dist/tests/fourslash/hover.dunderNew.overloads.fourslash.js +1 -1
  181. package/dist/tests/fourslash/hover.dunderNew.overloads.fourslash.js.map +1 -1
  182. package/dist/tests/fourslash/hover.dunderNew.withInit.fourslash.js +1 -1
  183. package/dist/tests/fourslash/hover.dunderNew.withInit.fourslash.js.map +1 -1
  184. package/dist/tests/fourslash/hover.formatted.fourslash.js +6 -6
  185. package/dist/tests/fourslash/hover.formatted.fourslash.js.map +1 -1
  186. package/dist/tests/fourslash/hover.fourslash.js +1 -1
  187. package/dist/tests/fourslash/hover.fourslash.js.map +1 -1
  188. package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js +6 -6
  189. package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js.map +1 -1
  190. package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js +5 -5
  191. package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js.map +1 -1
  192. package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js +4 -4
  193. package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js.map +1 -1
  194. package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js +2 -2
  195. package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js.map +1 -1
  196. package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js +2 -2
  197. package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js.map +1 -1
  198. package/dist/tests/fourslash/hover.init.fourslash.js +4 -4
  199. package/dist/tests/fourslash/hover.init.fourslash.js.map +1 -1
  200. package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js +2 -2
  201. package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js.map +1 -1
  202. package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js +2 -2
  203. package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js.map +1 -1
  204. package/dist/tests/fourslash/hover.libStub.fourslash.js +2 -2
  205. package/dist/tests/fourslash/hover.libStub.fourslash.js.map +1 -1
  206. package/dist/tests/fourslash/hover.overloadedFunction.fourslash.js +2 -2
  207. package/dist/tests/fourslash/hover.overloadedFunction.fourslash.js.map +1 -1
  208. package/dist/tests/fourslash/hover.plainText.fourslash.js +1 -1
  209. package/dist/tests/fourslash/hover.plainText.fourslash.js.map +1 -1
  210. package/dist/tests/fourslash/hover.wildcardimports.fourslash.js +1 -1
  211. package/dist/tests/fourslash/hover.wildcardimports.fourslash.js.map +1 -1
  212. package/dist/tests/fourslash/import.multipart.fourslash.js +1 -1
  213. package/dist/tests/fourslash/import.multipart.fourslash.js.map +1 -1
  214. package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js +1 -1
  215. package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js.map +1 -1
  216. package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js +1 -1
  217. package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js.map +1 -1
  218. package/dist/tests/fourslash/signature.complicated.fourslash.js +31 -1
  219. package/dist/tests/fourslash/signature.complicated.fourslash.js.map +1 -1
  220. package/dist/tests/harness/fourslash/testLanguageService.js +1 -1
  221. package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -1
  222. package/dist/tests/hoverProvider.test.js +27 -0
  223. package/dist/tests/hoverProvider.test.js.map +1 -1
  224. package/dist/tests/pathUtils.test.js +24 -1
  225. package/dist/tests/pathUtils.test.js.map +1 -1
  226. package/dist/tests/typeEvaluator1.test.js +16 -0
  227. package/dist/tests/typeEvaluator1.test.js.map +1 -1
  228. package/dist/tests/typeEvaluator2.test.js +4 -0
  229. package/dist/tests/typeEvaluator2.test.js.map +1 -1
  230. package/dist/tests/typeEvaluator3.test.js +2 -2
  231. package/dist/tests/typeEvaluator3.test.js.map +1 -1
  232. package/dist/tests/typeEvaluator4.test.js +11 -3
  233. package/dist/tests/typeEvaluator4.test.js.map +1 -1
  234. package/dist/workspaceMap.d.ts +4 -0
  235. package/dist/workspaceMap.js +67 -37
  236. package/dist/workspaceMap.js.map +1 -1
  237. package/package.json +1 -1
@@ -1,17 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * checker.ts
4
- * Copyright (c) Microsoft Corporation.
5
- * Licensed under the MIT license.
6
- * Author: Eric Traut
7
- *
8
- * A parse tree walker that performs static type checking for
9
- * a source file. Most of its work is performed by the type
10
- * evaluator, but this module touches every node in the file
11
- * to ensure that all statements and expressions are evaluated
12
- * and checked. It also performs some additional checks that
13
- * cannot (or should not be) performed lazily.
14
- */
15
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
3
  if (k2 === undefined) k2 = k;
17
4
  Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
@@ -33,6 +20,20 @@ var __importStar = (this && this.__importStar) || function (mod) {
33
20
  };
34
21
  Object.defineProperty(exports, "__esModule", { value: true });
35
22
  exports.Checker = void 0;
23
+ /*
24
+ * checker.ts
25
+ * Copyright (c) Microsoft Corporation.
26
+ * Licensed under the MIT license.
27
+ * Author: Eric Traut
28
+ *
29
+ * A parse tree walker that performs static type checking for
30
+ * a source file. Most of its work is performed by the type
31
+ * evaluator, but this module touches every node in the file
32
+ * to ensure that all statements and expressions are evaluated
33
+ * and checked. It also performs some additional checks that
34
+ * cannot (or should not be) performed lazily.
35
+ */
36
+ const vscode_languageserver_1 = require("vscode-languageserver");
36
37
  const debug_1 = require("../common/debug");
37
38
  const diagnostic_1 = require("../common/diagnostic");
38
39
  const diagnosticRules_1 = require("../common/diagnosticRules");
@@ -104,12 +105,13 @@ const deprecatedSpecialForms = new Map([
104
105
  // functions to be emitted.
105
106
  const isPrintCodeComplexityEnabled = false;
106
107
  class Checker extends parseTreeWalker_1.ParseTreeWalker {
107
- constructor(_importResolver, _evaluator, _parseResults, _sourceMapper) {
108
+ constructor(_importResolver, _evaluator, _parseResults, _sourceMapper, _dependentFiles) {
108
109
  super();
109
110
  this._importResolver = _importResolver;
110
111
  this._evaluator = _evaluator;
111
112
  this._parseResults = _parseResults;
112
113
  this._sourceMapper = _sourceMapper;
114
+ this._dependentFiles = _dependentFiles;
113
115
  this._isUnboundCheckSuppressed = false;
114
116
  // A list of all nodes that are defined within the module that
115
117
  // have their own scopes.
@@ -1359,7 +1361,7 @@ class Checker extends parseTreeWalker_1.ParseTreeWalker {
1359
1361
  var _a, _b, _c, _d, _e, _f;
1360
1362
  const nameType = this._evaluator.getType(nameNode);
1361
1363
  ``;
1362
- if (nameType && (0, types_1.isTypeVar)(nameType)) {
1364
+ if (nameType && (0, types_1.isTypeVar)(nameType) && !nameType.details.isSynthesizedSelf) {
1363
1365
  // Does this name refer to a TypeVar that is scoped to this function?
1364
1366
  if (nameType.scopeId === this._evaluator.getScopeIdForNode(node)) {
1365
1367
  // We exempt constrained TypeVars, bound TypeVars that are type arguments of
@@ -1768,11 +1770,13 @@ class Checker extends parseTreeWalker_1.ParseTreeWalker {
1768
1770
  });
1769
1771
  }
1770
1772
  _validateSymbolTables() {
1773
+ var _a;
1774
+ const dependentFileInfo = (_a = this._dependentFiles) === null || _a === void 0 ? void 0 : _a.map((p) => AnalyzerNodeInfo.getFileInfo(p.parseTree));
1771
1775
  for (const scopedNode of this._scopedNodes) {
1772
1776
  const scope = AnalyzerNodeInfo.getScope(scopedNode);
1773
1777
  if (scope) {
1774
1778
  scope.symbolTable.forEach((symbol, name) => {
1775
- this._conditionallyReportUnusedSymbol(name, symbol, scope.type);
1779
+ this._conditionallyReportUnusedSymbol(name, symbol, scope.type, dependentFileInfo);
1776
1780
  this._reportIncompatibleDeclarations(name, symbol);
1777
1781
  this._reportMultipleFinalDeclarations(name, symbol, scope.type);
1778
1782
  this._reportMultipleTypeAliasDeclarations(name, symbol);
@@ -2115,11 +2119,14 @@ class Checker extends parseTreeWalker_1.ParseTreeWalker {
2115
2119
  }
2116
2120
  }
2117
2121
  }
2118
- _conditionallyReportUnusedSymbol(name, symbol, scopeType) {
2122
+ _conditionallyReportUnusedSymbol(name, symbol, scopeType, dependentFileInfo) {
2119
2123
  const accessedSymbolSet = this._fileInfo.accessedSymbolSet;
2120
- if (symbol.isIgnoredForProtocolMatch() ||
2121
- accessedSymbolSet.has(symbol.id) ||
2122
- this._fileInfo.ipythonMode === sourceFile_1.IPythonMode.CellDocs) {
2124
+ if (symbol.isIgnoredForProtocolMatch() || accessedSymbolSet.has(symbol.id)) {
2125
+ return;
2126
+ }
2127
+ // If this file is implicitly imported by other files, we need to make sure the symbol defined in
2128
+ // the current file is not accessed from those other files.
2129
+ if (dependentFileInfo && dependentFileInfo.some((i) => i.accessedSymbolSet.has(symbol.id))) {
2123
2130
  return;
2124
2131
  }
2125
2132
  // A name of "_" means "I know this symbol isn't used", so
@@ -2686,7 +2693,7 @@ class Checker extends parseTreeWalker_1.ParseTreeWalker {
2686
2693
  const stdlibPath = this._importResolver.getTypeshedStdLibPath(this._fileInfo.executionEnvironment);
2687
2694
  if (stdlibPath && this._importResolver.isStdlibModule(module, this._fileInfo.executionEnvironment)) {
2688
2695
  // If the definition for this name is in 'user' module, it is overwriting the stdlib module.
2689
- const definitions = definitionProvider_1.DefinitionProvider.getDefinitionsForNode(this._sourceMapper, namePartNodes[namePartNodes.length - 1], definitionProvider_1.DefinitionFilter.All, this._evaluator);
2696
+ const definitions = definitionProvider_1.DefinitionProvider.getDefinitionsForNode(this._sourceMapper, namePartNodes[namePartNodes.length - 1], definitionProvider_1.DefinitionFilter.All, this._evaluator, vscode_languageserver_1.CancellationToken.None);
2690
2697
  const paths = definitions ? definitions.map((d) => d.path) : [];
2691
2698
  paths.forEach((p) => {
2692
2699
  if (!p.startsWith(stdlibPath) && !(0, sourceMapper_1.isStubFile)(p) && this._sourceMapper.isUserCode(p)) {