@zzzen/pyright-internal 1.2.0-dev.20240728 → 1.2.0-dev.20240811

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 (748) hide show
  1. package/dist/analyzer/analysis.js +2 -2
  2. package/dist/analyzer/analysis.js.map +1 -1
  3. package/dist/analyzer/analyzerFileInfo.js +1 -2
  4. package/dist/analyzer/analyzerFileInfo.js.map +1 -1
  5. package/dist/analyzer/analyzerNodeInfo.js +20 -21
  6. package/dist/analyzer/analyzerNodeInfo.js.map +1 -1
  7. package/dist/analyzer/backgroundAnalysisProgram.js.map +1 -1
  8. package/dist/analyzer/binder.js +8 -5
  9. package/dist/analyzer/binder.js.map +1 -1
  10. package/dist/analyzer/cacheManager.d.ts +0 -1
  11. package/dist/analyzer/cacheManager.js.map +1 -1
  12. package/dist/analyzer/checker.d.ts +4 -1
  13. package/dist/analyzer/checker.js +371 -254
  14. package/dist/analyzer/checker.js.map +1 -1
  15. package/dist/analyzer/circularDependency.js.map +1 -1
  16. package/dist/analyzer/codeFlowEngine.js +10 -10
  17. package/dist/analyzer/codeFlowEngine.js.map +1 -1
  18. package/dist/analyzer/codeFlowTypes.d.ts +17 -17
  19. package/dist/analyzer/codeFlowTypes.js +5 -5
  20. package/dist/analyzer/codeFlowTypes.js.map +1 -1
  21. package/dist/analyzer/codeFlowUtils.js +1 -2
  22. package/dist/analyzer/codeFlowUtils.js.map +1 -1
  23. package/dist/analyzer/commentUtils.js +1 -2
  24. package/dist/analyzer/commentUtils.js.map +1 -1
  25. package/dist/analyzer/constraintSolution.d.ts +22 -0
  26. package/dist/analyzer/constraintSolution.js +77 -0
  27. package/dist/analyzer/constraintSolution.js.map +1 -0
  28. package/dist/analyzer/constraintSolver.d.ts +8 -5
  29. package/dist/analyzer/constraintSolver.js +427 -353
  30. package/dist/analyzer/constraintSolver.js.map +1 -1
  31. package/dist/analyzer/constraintTracker.d.ts +45 -0
  32. package/dist/analyzer/constraintTracker.js +235 -0
  33. package/dist/analyzer/constraintTracker.js.map +1 -0
  34. package/dist/analyzer/constructorTransform.js +23 -23
  35. package/dist/analyzer/constructorTransform.js.map +1 -1
  36. package/dist/analyzer/constructors.d.ts +1 -1
  37. package/dist/analyzer/constructors.js +71 -51
  38. package/dist/analyzer/constructors.js.map +1 -1
  39. package/dist/analyzer/dataClasses.js +72 -58
  40. package/dist/analyzer/dataClasses.js.map +1 -1
  41. package/dist/analyzer/declaration.js +11 -11
  42. package/dist/analyzer/declaration.js.map +1 -1
  43. package/dist/analyzer/declarationUtils.js +8 -9
  44. package/dist/analyzer/declarationUtils.js.map +1 -1
  45. package/dist/analyzer/decorators.d.ts +1 -1
  46. package/dist/analyzer/decorators.js +34 -30
  47. package/dist/analyzer/decorators.js.map +1 -1
  48. package/dist/analyzer/docStringConversion.js +2 -3
  49. package/dist/analyzer/docStringConversion.js.map +1 -1
  50. package/dist/analyzer/docStringUtils.js +2 -3
  51. package/dist/analyzer/docStringUtils.js.map +1 -1
  52. package/dist/analyzer/enums.js +17 -14
  53. package/dist/analyzer/enums.js.map +1 -1
  54. package/dist/analyzer/functionTransform.d.ts +2 -2
  55. package/dist/analyzer/functionTransform.js +2 -3
  56. package/dist/analyzer/functionTransform.js.map +1 -1
  57. package/dist/analyzer/importResolver.d.ts +0 -1
  58. package/dist/analyzer/importResolver.js +5 -5
  59. package/dist/analyzer/importResolver.js.map +1 -1
  60. package/dist/analyzer/importStatementUtils.js +15 -15
  61. package/dist/analyzer/importStatementUtils.js.map +1 -1
  62. package/dist/analyzer/namedTuples.js +2 -3
  63. package/dist/analyzer/namedTuples.js.map +1 -1
  64. package/dist/analyzer/operations.d.ts +1 -2
  65. package/dist/analyzer/operations.js +101 -79
  66. package/dist/analyzer/operations.js.map +1 -1
  67. package/dist/analyzer/packageTypeReport.d.ts +3 -3
  68. package/dist/analyzer/packageTypeReport.js +2 -2
  69. package/dist/analyzer/packageTypeReport.js.map +1 -1
  70. package/dist/analyzer/packageTypeVerifier.js +17 -13
  71. package/dist/analyzer/packageTypeVerifier.js.map +1 -1
  72. package/dist/analyzer/parameterUtils.d.ts +3 -3
  73. package/dist/analyzer/parameterUtils.js +23 -25
  74. package/dist/analyzer/parameterUtils.js.map +1 -1
  75. package/dist/analyzer/parentDirectoryCache.js.map +1 -1
  76. package/dist/analyzer/parseTreeUtils.js +94 -92
  77. package/dist/analyzer/parseTreeUtils.js.map +1 -1
  78. package/dist/analyzer/parseTreeWalker.js +2 -2
  79. package/dist/analyzer/parseTreeWalker.js.map +1 -1
  80. package/dist/analyzer/patternMatching.js +39 -41
  81. package/dist/analyzer/patternMatching.js.map +1 -1
  82. package/dist/analyzer/program.js +5 -1
  83. package/dist/analyzer/program.js.map +1 -1
  84. package/dist/analyzer/properties.d.ts +3 -2
  85. package/dist/analyzer/properties.js +16 -18
  86. package/dist/analyzer/properties.js.map +1 -1
  87. package/dist/analyzer/protocols.d.ts +3 -3
  88. package/dist/analyzer/protocols.js +58 -60
  89. package/dist/analyzer/protocols.js.map +1 -1
  90. package/dist/analyzer/pyTypedUtils.js +2 -3
  91. package/dist/analyzer/pyTypedUtils.js.map +1 -1
  92. package/dist/analyzer/pythonPathUtils.js +6 -6
  93. package/dist/analyzer/pythonPathUtils.js.map +1 -1
  94. package/dist/analyzer/scope.js.map +1 -1
  95. package/dist/analyzer/scopeUtils.js +5 -6
  96. package/dist/analyzer/scopeUtils.js.map +1 -1
  97. package/dist/analyzer/service.d.ts +3 -0
  98. package/dist/analyzer/service.js +173 -103
  99. package/dist/analyzer/service.js.map +1 -1
  100. package/dist/analyzer/serviceUtils.js +5 -5
  101. package/dist/analyzer/serviceUtils.js.map +1 -1
  102. package/dist/analyzer/sourceFile.js.map +1 -1
  103. package/dist/analyzer/sourceFileInfo.js.map +1 -1
  104. package/dist/analyzer/sourceFileInfoUtils.js +4 -5
  105. package/dist/analyzer/sourceFileInfoUtils.js.map +1 -1
  106. package/dist/analyzer/sourceMapper.js +5 -4
  107. package/dist/analyzer/sourceMapper.js.map +1 -1
  108. package/dist/analyzer/sourceMapperUtils.js +1 -2
  109. package/dist/analyzer/sourceMapperUtils.js.map +1 -1
  110. package/dist/analyzer/staticExpressions.js +2 -3
  111. package/dist/analyzer/staticExpressions.js.map +1 -1
  112. package/dist/analyzer/symbol.js.map +1 -1
  113. package/dist/analyzer/symbolNameUtils.js +8 -9
  114. package/dist/analyzer/symbolNameUtils.js.map +1 -1
  115. package/dist/analyzer/symbolUtils.js +4 -5
  116. package/dist/analyzer/symbolUtils.js.map +1 -1
  117. package/dist/analyzer/testWalker.js.map +1 -1
  118. package/dist/analyzer/tracePrinter.js +5 -4
  119. package/dist/analyzer/tracePrinter.js.map +1 -1
  120. package/dist/analyzer/tuples.d.ts +2 -2
  121. package/dist/analyzer/tuples.js +14 -14
  122. package/dist/analyzer/tuples.js.map +1 -1
  123. package/dist/analyzer/typeCacheUtils.js.map +1 -1
  124. package/dist/analyzer/typeComplexity.js +14 -7
  125. package/dist/analyzer/typeComplexity.js.map +1 -1
  126. package/dist/analyzer/typeDocStringUtils.d.ts +2 -2
  127. package/dist/analyzer/typeDocStringUtils.js +34 -25
  128. package/dist/analyzer/typeDocStringUtils.js.map +1 -1
  129. package/dist/analyzer/typeEvaluator.js +1021 -993
  130. package/dist/analyzer/typeEvaluator.js.map +1 -1
  131. package/dist/analyzer/typeEvaluatorTypes.d.ts +31 -13
  132. package/dist/analyzer/typeEvaluatorTypes.js.map +1 -1
  133. package/dist/analyzer/typeEvaluatorWithTracker.js +1 -2
  134. package/dist/analyzer/typeEvaluatorWithTracker.js.map +1 -1
  135. package/dist/analyzer/typeGuards.js +72 -64
  136. package/dist/analyzer/typeGuards.js.map +1 -1
  137. package/dist/analyzer/typePrinter.js +28 -26
  138. package/dist/analyzer/typePrinter.js.map +1 -1
  139. package/dist/analyzer/typeStubWriter.js.map +1 -1
  140. package/dist/analyzer/typeUtils.d.ts +36 -38
  141. package/dist/analyzer/typeUtils.js +465 -746
  142. package/dist/analyzer/typeUtils.js.map +1 -1
  143. package/dist/analyzer/typeWalker.d.ts +2 -2
  144. package/dist/analyzer/typeWalker.js +10 -5
  145. package/dist/analyzer/typeWalker.js.map +1 -1
  146. package/dist/analyzer/typedDicts.d.ts +2 -2
  147. package/dist/analyzer/typedDicts.js +52 -52
  148. package/dist/analyzer/typedDicts.js.map +1 -1
  149. package/dist/analyzer/types.d.ts +41 -36
  150. package/dist/analyzer/types.js +178 -184
  151. package/dist/analyzer/types.js.map +1 -1
  152. package/dist/backgroundAnalysisBase.d.ts +0 -1
  153. package/dist/backgroundAnalysisBase.js.map +1 -1
  154. package/dist/backgroundThreadBase.d.ts +0 -1
  155. package/dist/backgroundThreadBase.js +7 -7
  156. package/dist/backgroundThreadBase.js.map +1 -1
  157. package/dist/commands/commandController.js.map +1 -1
  158. package/dist/commands/createTypeStub.js.map +1 -1
  159. package/dist/commands/dumpFileDebugInfoCommand.js +2 -2
  160. package/dist/commands/dumpFileDebugInfoCommand.js.map +1 -1
  161. package/dist/commands/quickActionCommand.js.map +1 -1
  162. package/dist/common/cancellationUtils.js +9 -9
  163. package/dist/common/cancellationUtils.js.map +1 -1
  164. package/dist/common/chokidarFileWatcherProvider.js +3 -3
  165. package/dist/common/chokidarFileWatcherProvider.js.map +1 -1
  166. package/dist/common/collectionUtils.js +23 -23
  167. package/dist/common/collectionUtils.js.map +1 -1
  168. package/dist/common/commandLineOptions.d.ts +19 -12
  169. package/dist/common/commandLineOptions.js +26 -9
  170. package/dist/common/commandLineOptions.js.map +1 -1
  171. package/dist/common/commandUtils.js +1 -2
  172. package/dist/common/commandUtils.js.map +1 -1
  173. package/dist/common/configOptions.d.ts +2 -2
  174. package/dist/common/configOptions.js +30 -40
  175. package/dist/common/configOptions.js.map +1 -1
  176. package/dist/common/console.js +4 -4
  177. package/dist/common/console.js.map +1 -1
  178. package/dist/common/core.js +21 -21
  179. package/dist/common/core.js.map +1 -1
  180. package/dist/common/crypto.js +1 -2
  181. package/dist/common/crypto.js.map +1 -1
  182. package/dist/common/debug.js +9 -10
  183. package/dist/common/debug.js.map +1 -1
  184. package/dist/common/deferred.js +3 -4
  185. package/dist/common/deferred.js.map +1 -1
  186. package/dist/common/diagnostic.js +3 -3
  187. package/dist/common/diagnostic.js.map +1 -1
  188. package/dist/common/diagnosticSink.js.map +1 -1
  189. package/dist/common/envVarUtils.js +2 -3
  190. package/dist/common/envVarUtils.js.map +1 -1
  191. package/dist/common/fileBasedCancellationUtils.js +4 -4
  192. package/dist/common/fileBasedCancellationUtils.js.map +1 -1
  193. package/dist/common/fileSystem.d.ts +0 -2
  194. package/dist/common/fileWatcher.js +2 -2
  195. package/dist/common/fileWatcher.js.map +1 -1
  196. package/dist/common/fullAccessHost.js.map +1 -1
  197. package/dist/common/logTracker.js +2 -2
  198. package/dist/common/logTracker.js.map +1 -1
  199. package/dist/common/lspUtils.d.ts +1 -1
  200. package/dist/common/lspUtils.js +3 -4
  201. package/dist/common/lspUtils.js.map +1 -1
  202. package/dist/common/memUtils.js +2 -2
  203. package/dist/common/memUtils.js.map +1 -1
  204. package/dist/common/pathUtils.js +32 -32
  205. package/dist/common/pathUtils.js.map +1 -1
  206. package/dist/common/positionUtils.js +7 -8
  207. package/dist/common/positionUtils.js.map +1 -1
  208. package/dist/common/progressReporter.js.map +1 -1
  209. package/dist/common/pythonVersion.js.map +1 -1
  210. package/dist/common/realFileSystem.d.ts +0 -2
  211. package/dist/common/realFileSystem.js +2 -2
  212. package/dist/common/realFileSystem.js.map +1 -1
  213. package/dist/common/serviceProvider.js.map +1 -1
  214. package/dist/common/serviceProviderExtensions.js +1 -2
  215. package/dist/common/serviceProviderExtensions.js.map +1 -1
  216. package/dist/common/stringUtils.js +12 -13
  217. package/dist/common/stringUtils.js.map +1 -1
  218. package/dist/common/textEditTracker.js.map +1 -1
  219. package/dist/common/textRange.js +13 -13
  220. package/dist/common/textRange.js.map +1 -1
  221. package/dist/common/textRangeCollection.js +2 -2
  222. package/dist/common/textRangeCollection.js.map +1 -1
  223. package/dist/common/timing.js.map +1 -1
  224. package/dist/common/uri/baseUri.js.map +1 -1
  225. package/dist/common/uri/fileUri.js.map +1 -1
  226. package/dist/common/uri/memoization.js +3 -4
  227. package/dist/common/uri/memoization.js.map +1 -1
  228. package/dist/common/uri/uri.js.map +1 -1
  229. package/dist/common/uri/uriUtils.d.ts +0 -1
  230. package/dist/common/uri/uriUtils.js +20 -20
  231. package/dist/common/uri/uriUtils.js.map +1 -1
  232. package/dist/common/uri/webUri.js.map +1 -1
  233. package/dist/common/workspaceEditUtils.js +8 -9
  234. package/dist/common/workspaceEditUtils.js.map +1 -1
  235. package/dist/languageServerBase.d.ts +2 -2
  236. package/dist/languageServerBase.js +5 -2
  237. package/dist/languageServerBase.js.map +1 -1
  238. package/dist/languageService/analyzerServiceExecutor.js +30 -29
  239. package/dist/languageService/analyzerServiceExecutor.js.map +1 -1
  240. package/dist/languageService/autoImporter.js +4 -4
  241. package/dist/languageService/autoImporter.js.map +1 -1
  242. package/dist/languageService/callHierarchyProvider.js.map +1 -1
  243. package/dist/languageService/codeActionProvider.js.map +1 -1
  244. package/dist/languageService/completionProvider.js +4 -4
  245. package/dist/languageService/completionProvider.js.map +1 -1
  246. package/dist/languageService/completionProviderUtils.js +4 -5
  247. package/dist/languageService/completionProviderUtils.js.map +1 -1
  248. package/dist/languageService/definitionProvider.js +5 -5
  249. package/dist/languageService/definitionProvider.js.map +1 -1
  250. package/dist/languageService/documentHighlightProvider.js.map +1 -1
  251. package/dist/languageService/documentSymbolCollector.js +3 -3
  252. package/dist/languageService/documentSymbolCollector.js.map +1 -1
  253. package/dist/languageService/documentSymbolProvider.js +2 -2
  254. package/dist/languageService/documentSymbolProvider.js.map +1 -1
  255. package/dist/languageService/dynamicFeature.js.map +1 -1
  256. package/dist/languageService/fileWatcherDynamicFeature.js.map +1 -1
  257. package/dist/languageService/hoverProvider.js +6 -6
  258. package/dist/languageService/hoverProvider.js.map +1 -1
  259. package/dist/languageService/importSorter.js.map +1 -1
  260. package/dist/languageService/navigationUtils.js +3 -4
  261. package/dist/languageService/navigationUtils.js.map +1 -1
  262. package/dist/languageService/quickActions.js +1 -2
  263. package/dist/languageService/quickActions.js.map +1 -1
  264. package/dist/languageService/referencesProvider.js.map +1 -1
  265. package/dist/languageService/renameProvider.js.map +1 -1
  266. package/dist/languageService/signatureHelpProvider.js.map +1 -1
  267. package/dist/languageService/symbolIndexer.js.map +1 -1
  268. package/dist/languageService/tooltipUtils.d.ts +5 -5
  269. package/dist/languageService/tooltipUtils.js +31 -31
  270. package/dist/languageService/tooltipUtils.js.map +1 -1
  271. package/dist/languageService/workspaceSymbolProvider.js.map +1 -1
  272. package/dist/localization/localize.d.ts +3 -0
  273. package/dist/localization/localize.js +7 -6
  274. package/dist/localization/localize.js.map +1 -1
  275. package/dist/localization/package.nls.en-us.json +2 -1
  276. package/dist/nodeMain.js +1 -2
  277. package/dist/nodeMain.js.map +1 -1
  278. package/dist/nodeServer.js +2 -3
  279. package/dist/nodeServer.js.map +1 -1
  280. package/dist/parser/characterStream.js.map +1 -1
  281. package/dist/parser/characters.js +10 -11
  282. package/dist/parser/characters.js.map +1 -1
  283. package/dist/parser/parseNodes.d.ts +8 -8
  284. package/dist/parser/parseNodes.js +5 -5
  285. package/dist/parser/parseNodes.js.map +1 -1
  286. package/dist/parser/parser.js.map +1 -1
  287. package/dist/parser/stringTokenUtils.js +2 -2
  288. package/dist/parser/stringTokenUtils.js.map +1 -1
  289. package/dist/parser/tokenizer.js.map +1 -1
  290. package/dist/parser/unicode.js +468 -468
  291. package/dist/parser/unicode.js.map +1 -1
  292. package/dist/pprof/profiler.js +2 -3
  293. package/dist/pprof/profiler.js.map +1 -1
  294. package/dist/pyright.js +22 -23
  295. package/dist/pyright.js.map +1 -1
  296. package/dist/pyrightFileSystem.d.ts +0 -2
  297. package/dist/pyrightFileSystem.js.map +1 -1
  298. package/dist/readonlyAugmentedFileSystem.d.ts +0 -2
  299. package/dist/readonlyAugmentedFileSystem.js.map +1 -1
  300. package/dist/server.js.map +1 -1
  301. package/dist/tests/cacheManager.test.js.map +1 -1
  302. package/dist/tests/chainedSourceFiles.test.js.map +1 -1
  303. package/dist/tests/checker.test.js +13 -5
  304. package/dist/tests/checker.test.js.map +1 -1
  305. package/dist/tests/classDeclaration.test.js.map +1 -1
  306. package/dist/tests/config.test.js +160 -24
  307. package/dist/tests/config.test.js.map +1 -1
  308. package/dist/tests/debug.test.js.map +1 -1
  309. package/dist/tests/diagnosticOverrides.test.js.map +1 -1
  310. package/dist/tests/docStringConversion.test.js +1 -2
  311. package/dist/tests/docStringConversion.test.js.map +1 -1
  312. package/dist/tests/documentSymbolCollector.test.js.map +1 -1
  313. package/dist/tests/filesystem.test.js.map +1 -1
  314. package/dist/tests/fourSlashParser.test.js.map +1 -1
  315. package/dist/tests/fourSlashRunner.test.js.map +1 -1
  316. package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.d.ts +0 -1
  317. package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js.map +1 -1
  318. package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.d.ts +0 -1
  319. package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js.map +1 -1
  320. package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.d.ts +0 -1
  321. package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.d.ts +0 -1
  322. package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.d.ts +0 -1
  323. package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js.map +1 -1
  324. package/dist/tests/fourslash/completions.autoimport.fourslash.d.ts +0 -1
  325. package/dist/tests/fourslash/completions.autoimport.fourslash.js.map +1 -1
  326. package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.d.ts +0 -1
  327. package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js.map +1 -1
  328. package/dist/tests/fourslash/completions.autoimport.lib.alias.fourslash.d.ts +0 -1
  329. package/dist/tests/fourslash/completions.autoimport.lib.alias.fourslash.js.map +1 -1
  330. package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.d.ts +0 -1
  331. package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js.map +1 -1
  332. package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.d.ts +0 -1
  333. package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js.map +1 -1
  334. package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.d.ts +0 -1
  335. package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js.map +1 -1
  336. package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.d.ts +0 -1
  337. package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js.map +1 -1
  338. package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.d.ts +0 -1
  339. package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js.map +1 -1
  340. package/dist/tests/fourslash/completions.builtinOverride.fourslash.d.ts +0 -1
  341. package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.d.ts +0 -1
  342. package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js.map +1 -1
  343. package/dist/tests/fourslash/completions.call.typedDict.fourslash.d.ts +0 -1
  344. package/dist/tests/fourslash/completions.call.typedDict.fourslash.js.map +1 -1
  345. package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.d.ts +0 -1
  346. package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js.map +1 -1
  347. package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.d.ts +0 -1
  348. package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js.map +1 -1
  349. package/dist/tests/fourslash/completions.classVariable.fourslash.d.ts +0 -1
  350. package/dist/tests/fourslash/completions.classVariable.fourslash.js.map +1 -1
  351. package/dist/tests/fourslash/completions.comment.fourslash.d.ts +0 -1
  352. package/dist/tests/fourslash/completions.declNames.class.fourslash.d.ts +0 -1
  353. package/dist/tests/fourslash/completions.declNames.class.fourslash.js.map +1 -1
  354. package/dist/tests/fourslash/completions.declNames.exception.fourslash.d.ts +0 -1
  355. package/dist/tests/fourslash/completions.declNames.for.fourslash.d.ts +0 -1
  356. package/dist/tests/fourslash/completions.declNames.for.fourslash.js.map +1 -1
  357. package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.d.ts +0 -1
  358. package/dist/tests/fourslash/completions.declNames.lambda.fourslash.d.ts +0 -1
  359. package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js.map +1 -1
  360. package/dist/tests/fourslash/completions.declNames.method.fourslash.d.ts +0 -1
  361. package/dist/tests/fourslash/completions.declNames.method.fourslash.js.map +1 -1
  362. package/dist/tests/fourslash/completions.declNames.overload.fourslash.d.ts +0 -1
  363. package/dist/tests/fourslash/completions.declNames.overload.fourslash.js.map +1 -1
  364. package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.d.ts +0 -1
  365. package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js.map +1 -1
  366. package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.d.ts +0 -1
  367. package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js.map +1 -1
  368. package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.d.ts +0 -1
  369. package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js.map +1 -1
  370. package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.d.ts +0 -1
  371. package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js.map +1 -1
  372. package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.d.ts +0 -1
  373. package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js.map +1 -1
  374. package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.d.ts +0 -1
  375. package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js.map +1 -1
  376. package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.d.ts +0 -1
  377. package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js.map +1 -1
  378. package/dist/tests/fourslash/completions.dunderNew.Inheritance.fourslash.d.ts +0 -1
  379. package/dist/tests/fourslash/completions.dunderNew.fourslash.d.ts +0 -1
  380. package/dist/tests/fourslash/completions.enums.members.fourslash.d.ts +0 -1
  381. package/dist/tests/fourslash/completions.errorNodes.fourslash.d.ts +0 -1
  382. package/dist/tests/fourslash/completions.excluded.fourslash.d.ts +0 -1
  383. package/dist/tests/fourslash/completions.fourslash.d.ts +0 -1
  384. package/dist/tests/fourslash/completions.fstring.fourslash.d.ts +0 -1
  385. package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.d.ts +0 -1
  386. package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js.map +1 -1
  387. package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.d.ts +0 -1
  388. package/dist/tests/fourslash/completions.import.dunderNames.fourslash.d.ts +0 -1
  389. package/dist/tests/fourslash/completions.import.exactMatch.fourslash.d.ts +0 -1
  390. package/dist/tests/fourslash/completions.import.excludeAlreadyImported.fourslash.d.ts +0 -1
  391. package/dist/tests/fourslash/completions.import.interimFile.fourslash.disabled.d.ts +0 -1
  392. package/dist/tests/fourslash/completions.import.interimFile.fourslash.disabled.js.map +1 -1
  393. package/dist/tests/fourslash/completions.import.submodule.fourslash.d.ts +0 -1
  394. package/dist/tests/fourslash/completions.inList.fourslash.d.ts +0 -1
  395. package/dist/tests/fourslash/completions.inList.fourslash.js.map +1 -1
  396. package/dist/tests/fourslash/completions.included.fourslash.d.ts +0 -1
  397. package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.d.ts +0 -1
  398. package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js.map +1 -1
  399. package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.d.ts +0 -1
  400. package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.d.ts +0 -1
  401. package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.d.ts +0 -1
  402. package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.d.ts +0 -1
  403. package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.d.ts +0 -1
  404. package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.d.ts +0 -1
  405. package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js.map +1 -1
  406. package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.d.ts +0 -1
  407. package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.d.ts +0 -1
  408. package/dist/tests/fourslash/completions.libStub.fourslash.d.ts +0 -1
  409. package/dist/tests/fourslash/completions.literals.fourslash.d.ts +0 -1
  410. package/dist/tests/fourslash/completions.literals.fourslash.js.map +1 -1
  411. package/dist/tests/fourslash/completions.localCode.fourslash.d.ts +0 -1
  412. package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.d.ts +0 -1
  413. package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.d.ts +0 -1
  414. package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.d.ts +0 -1
  415. package/dist/tests/fourslash/completions.overloads.fourslash.d.ts +0 -1
  416. package/dist/tests/fourslash/completions.override.default.fourslash.d.ts +0 -1
  417. package/dist/tests/fourslash/completions.override.default.importStub.d.ts +0 -1
  418. package/dist/tests/fourslash/completions.override.default.imported.fourslash.d.ts +0 -1
  419. package/dist/tests/fourslash/completions.override.default.stub.fourslash.d.ts +0 -1
  420. package/dist/tests/fourslash/completions.override.fourslash.d.ts +0 -1
  421. package/dist/tests/fourslash/completions.override.property.fourslash.d.ts +0 -1
  422. package/dist/tests/fourslash/completions.override.property.stub.fourslash.d.ts +0 -1
  423. package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.d.ts +0 -1
  424. package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js.map +1 -1
  425. package/dist/tests/fourslash/completions.override.stub.fourslash.d.ts +0 -1
  426. package/dist/tests/fourslash/completions.override2.fourslash.d.ts +0 -1
  427. package/dist/tests/fourslash/completions.override2.fourslash.js.map +1 -1
  428. package/dist/tests/fourslash/completions.parameters.fourslash.d.ts +0 -1
  429. package/dist/tests/fourslash/completions.params.fourslash.d.ts +0 -1
  430. package/dist/tests/fourslash/completions.parentFolder.fourslash.d.ts +0 -1
  431. package/dist/tests/fourslash/completions.parentFolders.fourslash.d.ts +0 -1
  432. package/dist/tests/fourslash/completions.parentFolders.fourslash.js.map +1 -1
  433. package/dist/tests/fourslash/completions.plainText.fourslash.d.ts +0 -1
  434. package/dist/tests/fourslash/completions.private.fourslash.d.ts +0 -1
  435. package/dist/tests/fourslash/completions.private.fourslash.js.map +1 -1
  436. package/dist/tests/fourslash/completions.property.fourslash.d.ts +0 -1
  437. package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.d.ts +0 -1
  438. package/dist/tests/fourslash/completions.self.fourslash.d.ts +0 -1
  439. package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.d.ts +0 -1
  440. package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js.map +1 -1
  441. package/dist/tests/fourslash/completions.stringLiteral.fourslash.d.ts +0 -1
  442. package/dist/tests/fourslash/completions.stringLiteral.fourslash.js.map +1 -1
  443. package/dist/tests/fourslash/completions.triggers.fourslash.d.ts +0 -1
  444. package/dist/tests/fourslash/completions.triggers.fourslash.js.map +1 -1
  445. package/dist/tests/fourslash/completions.typeAlias.fourslash.d.ts +0 -1
  446. package/dist/tests/fourslash/completions.typeshed.fourslash.d.ts +0 -1
  447. package/dist/tests/fourslash/completions.vardecls.fourslash.d.ts +0 -1
  448. package/dist/tests/fourslash/completions.vardecls.fourslash.js.map +1 -1
  449. package/dist/tests/fourslash/completions.variableDocStrings.fourslash.d.ts +0 -1
  450. package/dist/tests/fourslash/completions.wildcardimports.fourslash.d.ts +0 -1
  451. package/dist/tests/fourslash/completions.with.fourslash.d.ts +0 -1
  452. package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.d.ts +0 -1
  453. package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js.map +1 -1
  454. package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.d.ts +0 -1
  455. package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js.map +1 -1
  456. package/dist/tests/fourslash/findDefinitions.classes.fourslash.d.ts +0 -1
  457. package/dist/tests/fourslash/findDefinitions.classes.fourslash.js.map +1 -1
  458. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.d.ts +0 -1
  459. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js.map +1 -1
  460. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.d.ts +0 -1
  461. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js.map +1 -1
  462. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.d.ts +0 -1
  463. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js.map +1 -1
  464. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.d.ts +0 -1
  465. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js.map +1 -1
  466. package/dist/tests/fourslash/findDefinitions.fields.fourslash.d.ts +0 -1
  467. package/dist/tests/fourslash/findDefinitions.fields.fourslash.js.map +1 -1
  468. package/dist/tests/fourslash/findDefinitions.functions.fourslash.d.ts +0 -1
  469. package/dist/tests/fourslash/findDefinitions.functions.fourslash.js.map +1 -1
  470. package/dist/tests/fourslash/findDefinitions.methods.fourslash.d.ts +0 -1
  471. package/dist/tests/fourslash/findDefinitions.methods.fourslash.js.map +1 -1
  472. package/dist/tests/fourslash/findDefinitions.modules.fourslash.d.ts +0 -1
  473. package/dist/tests/fourslash/findDefinitions.modules.fourslash.js.map +1 -1
  474. package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.d.ts +0 -1
  475. package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js.map +1 -1
  476. package/dist/tests/fourslash/findDefinitions.namespaceImportWithInit.fourslash.d.ts +0 -1
  477. package/dist/tests/fourslash/findDefinitions.namespaceImportWithInit.fourslash.js.map +1 -1
  478. package/dist/tests/fourslash/findDefinitions.overloads.fourslash.d.ts +0 -1
  479. package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js.map +1 -1
  480. package/dist/tests/fourslash/findDefinitions.parameters.fourslash.d.ts +0 -1
  481. package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js.map +1 -1
  482. package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.d.ts +0 -1
  483. package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js.map +1 -1
  484. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.d.ts +0 -1
  485. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js.map +1 -1
  486. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.d.ts +0 -1
  487. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js.map +1 -1
  488. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.d.ts +0 -1
  489. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js.map +1 -1
  490. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.d.ts +0 -1
  491. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js.map +1 -1
  492. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.d.ts +0 -1
  493. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js.map +1 -1
  494. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.d.ts +0 -1
  495. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js.map +1 -1
  496. package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.d.ts +0 -1
  497. package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js.map +1 -1
  498. package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.d.ts +0 -1
  499. package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js.map +1 -1
  500. package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.d.ts +0 -1
  501. package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js.map +1 -1
  502. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.d.ts +0 -1
  503. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js.map +1 -1
  504. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.d.ts +0 -1
  505. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js.map +1 -1
  506. package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.d.ts +0 -1
  507. package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js.map +1 -1
  508. package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.d.ts +0 -1
  509. package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js.map +1 -1
  510. package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.d.ts +0 -1
  511. package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js.map +1 -1
  512. package/dist/tests/fourslash/findDefinitions.variables.fourslash.d.ts +0 -1
  513. package/dist/tests/fourslash/findDefinitions.variables.fourslash.js.map +1 -1
  514. package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.d.ts +0 -1
  515. package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js.map +1 -1
  516. package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.d.ts +0 -1
  517. package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js.map +1 -1
  518. package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.d.ts +0 -1
  519. package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js.map +1 -1
  520. package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.d.ts +0 -1
  521. package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js.map +1 -1
  522. package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.d.ts +0 -1
  523. package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js.map +1 -1
  524. package/dist/tests/fourslash/findallreferences.fourslash.d.ts +0 -1
  525. package/dist/tests/fourslash/findallreferences.fourslash.js.map +1 -1
  526. package/dist/tests/fourslash/findallreferences.importalias.fourslash.d.ts +0 -1
  527. package/dist/tests/fourslash/findallreferences.importalias.fourslash.js.map +1 -1
  528. package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.d.ts +0 -1
  529. package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js.map +1 -1
  530. package/dist/tests/fourslash/findallreferences.module.nested.fourslash.d.ts +0 -1
  531. package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js.map +1 -1
  532. package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.d.ts +0 -1
  533. package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js.map +1 -1
  534. package/dist/tests/fourslash/findallreferences.modules.fourslash.d.ts +0 -1
  535. package/dist/tests/fourslash/findallreferences.modules.fourslash.js.map +1 -1
  536. package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.d.ts +0 -1
  537. package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js.map +1 -1
  538. package/dist/tests/fourslash/findallreferences.openFiles.fourslash.d.ts +0 -1
  539. package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js.map +1 -1
  540. package/dist/tests/fourslash/findallreferences.parameter.fourslash.d.ts +0 -1
  541. package/dist/tests/fourslash/findallreferences.parameter.fourslash.js.map +1 -1
  542. package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.d.ts +0 -1
  543. package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js.map +1 -1
  544. package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.d.ts +0 -1
  545. package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js.map +1 -1
  546. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.d.ts +0 -1
  547. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js.map +1 -1
  548. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.d.ts +0 -1
  549. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js.map +1 -1
  550. package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.d.ts +0 -1
  551. package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js.map +1 -1
  552. package/dist/tests/fourslash/findallreferences.variable.fourslash.d.ts +0 -1
  553. package/dist/tests/fourslash/findallreferences.variable.fourslash.js.map +1 -1
  554. package/dist/tests/fourslash/highlightreferences.attributes.fourslash.d.ts +0 -1
  555. package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js.map +1 -1
  556. package/dist/tests/fourslash/hover.async.fourslash.d.ts +0 -1
  557. package/dist/tests/fourslash/hover.builtinDocstrings.builtinInheritedByBuiltin.fourslash.d.ts +0 -1
  558. package/dist/tests/fourslash/hover.builtinDocstrings.builtinInheritedByUserCode.fourslash.d.ts +0 -1
  559. package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.d.ts +0 -1
  560. package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js.map +1 -1
  561. package/dist/tests/fourslash/hover.class.docString.fourslash.d.ts +0 -1
  562. package/dist/tests/fourslash/hover.classNoInit.fourslash.d.ts +0 -1
  563. package/dist/tests/fourslash/hover.docFromSrc.fourslash.d.ts +0 -1
  564. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.d.ts +0 -1
  565. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.d.ts +0 -1
  566. package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.d.ts +0 -1
  567. package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.d.ts +0 -1
  568. package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.d.ts +0 -1
  569. package/dist/tests/fourslash/hover.docFromSrc.stringFormat.fourslash.d.ts +0 -1
  570. package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.d.ts +0 -1
  571. package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.d.ts +0 -1
  572. package/dist/tests/fourslash/hover.docstring.alias.fourslash.d.ts +0 -1
  573. package/dist/tests/fourslash/hover.docstring.links.fourslash.d.ts +0 -1
  574. package/dist/tests/fourslash/hover.docstring.overloads.fourslash.d.ts +0 -1
  575. package/dist/tests/fourslash/hover.docstring.parameter.fourslash.d.ts +0 -1
  576. package/dist/tests/fourslash/hover.docstring.split.fourslash.d.ts +0 -1
  577. package/dist/tests/fourslash/hover.dunderNew.basic.fourslash.d.ts +0 -1
  578. package/dist/tests/fourslash/hover.dunderNew.inheritance.fourslash.d.ts +0 -1
  579. package/dist/tests/fourslash/hover.dunderNew.inheritance2.fourslash.d.ts +0 -1
  580. package/dist/tests/fourslash/hover.dunderNew.overloads.fourslash.d.ts +0 -1
  581. package/dist/tests/fourslash/hover.dunderNew.withInit.fourslash.d.ts +0 -1
  582. package/dist/tests/fourslash/hover.formatted.fourslash.d.ts +0 -1
  583. package/dist/tests/fourslash/hover.fourslash.d.ts +0 -1
  584. package/dist/tests/fourslash/hover.import.django.view.fourslash.d.ts +0 -1
  585. package/dist/tests/fourslash/hover.import.fourslash.d.ts +0 -1
  586. package/dist/tests/fourslash/hover.inferred.fourslash.d.ts +0 -1
  587. package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.d.ts +0 -1
  588. package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.d.ts +0 -1
  589. package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.d.ts +0 -1
  590. package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.d.ts +0 -1
  591. package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.d.ts +0 -1
  592. package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.d.ts +0 -1
  593. package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.d.ts +0 -1
  594. package/dist/tests/fourslash/hover.init.fourslash.d.ts +0 -1
  595. package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.d.ts +0 -1
  596. package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.d.ts +0 -1
  597. package/dist/tests/fourslash/hover.libStub.fourslash.d.ts +0 -1
  598. package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.d.ts +0 -1
  599. package/dist/tests/fourslash/hover.overloadedFunction.fourslash.d.ts +0 -1
  600. package/dist/tests/fourslash/hover.plainText.fourslash.d.ts +0 -1
  601. package/dist/tests/fourslash/hover.slots.fourslash.d.ts +0 -1
  602. package/dist/tests/fourslash/hover.typedDict.key.fourslash.d.ts +0 -1
  603. package/dist/tests/fourslash/hover.unpackedTypedDict.key.fourslash.d.ts +0 -1
  604. package/dist/tests/fourslash/hover.variable.docString.fourslash.d.ts +0 -1
  605. package/dist/tests/fourslash/hover.wildcardimports.fourslash.d.ts +0 -1
  606. package/dist/tests/fourslash/import.multipart.fourslash.d.ts +0 -1
  607. package/dist/tests/fourslash/import.nameconflict.fourslash.d.ts +0 -1
  608. package/dist/tests/fourslash/import.publicSymbols.fourslash.d.ts +0 -1
  609. package/dist/tests/fourslash/import.publicSymbols.fourslash.js.map +1 -1
  610. package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.d.ts +0 -1
  611. package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.d.ts +0 -1
  612. package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.d.ts +0 -1
  613. package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.d.ts +0 -1
  614. package/dist/tests/fourslash/import.wildcard.fourslash.d.ts +0 -1
  615. package/dist/tests/fourslash/importnotresolved.fourslash.d.ts +0 -1
  616. package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.d.ts +0 -1
  617. package/dist/tests/fourslash/missingModuleSource.fourslash.d.ts +0 -1
  618. package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.d.ts +0 -1
  619. package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.d.ts +0 -1
  620. package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.d.ts +0 -1
  621. package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.d.ts +0 -1
  622. package/dist/tests/fourslash/missingTypeStub.command.trycatchImport.fourslash.d.ts +0 -1
  623. package/dist/tests/fourslash/missingTypeStub.fourslash.d.ts +0 -1
  624. package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.d.ts +0 -1
  625. package/dist/tests/fourslash/noerrors.fourslash.d.ts +0 -1
  626. package/dist/tests/fourslash/orderImports1.command.fourslash.d.ts +0 -1
  627. package/dist/tests/fourslash/orderImports2.command.fourslash.d.ts +0 -1
  628. package/dist/tests/fourslash/rename.args.fourslash.d.ts +0 -1
  629. package/dist/tests/fourslash/rename.args.fourslash.js.map +1 -1
  630. package/dist/tests/fourslash/rename.externallyHidden.fourslash.d.ts +0 -1
  631. package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.d.ts +0 -1
  632. package/dist/tests/fourslash/rename.fourslash.d.ts +0 -1
  633. package/dist/tests/fourslash/rename.fourslash.js.map +1 -1
  634. package/dist/tests/fourslash/rename.function.untitledFile.fourslash.d.ts +0 -1
  635. package/dist/tests/fourslash/rename.function.untitledFile.fourslash.js.map +1 -1
  636. package/dist/tests/fourslash/rename.init.fourslash.d.ts +0 -1
  637. package/dist/tests/fourslash/rename.init.fourslash.js.map +1 -1
  638. package/dist/tests/fourslash/rename.library.fourslash.d.ts +0 -1
  639. package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.d.ts +0 -1
  640. package/dist/tests/fourslash/rename.multipleDecl.fourslash.d.ts +0 -1
  641. package/dist/tests/fourslash/rename.parens.fourslash.d.ts +0 -1
  642. package/dist/tests/fourslash/rename.parens.fourslash.js.map +1 -1
  643. package/dist/tests/fourslash/rename.sourceAndStub.fourslash.d.ts +0 -1
  644. package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js.map +1 -1
  645. package/dist/tests/fourslash/rename.string.excluded.fourslash.d.ts +0 -1
  646. package/dist/tests/fourslash/rename.string.excluded.fourslash.js.map +1 -1
  647. package/dist/tests/fourslash/rename.string.fourslash.d.ts +0 -1
  648. package/dist/tests/fourslash/rename.string.fourslash.js.map +1 -1
  649. package/dist/tests/fourslash/shadowedImports.fourslash.d.ts +0 -1
  650. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedFunction.fourslash.d.ts +0 -1
  651. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedFunction.fourslash.js.map +1 -1
  652. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedVariable.fourslash.d.ts +0 -1
  653. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedVariable.fourslash.js.map +1 -1
  654. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.function.fourslash.d.ts +0 -1
  655. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.function.fourslash.js.map +1 -1
  656. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction1.fourslash.d.ts +0 -1
  657. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction1.fourslash.js.map +1 -1
  658. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction2.fourslash.d.ts +0 -1
  659. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction2.fourslash.js.map +1 -1
  660. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.function.fourslash.d.ts +0 -1
  661. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.function.fourslash.js.map +1 -1
  662. package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.d.ts +0 -1
  663. package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js.map +1 -1
  664. package/dist/tests/fourslash/signature.complicated.fourslash.d.ts +0 -1
  665. package/dist/tests/fourslash/signature.complicated.fourslash.js.map +1 -1
  666. package/dist/tests/fourslash/signature.cornercases.fourslash.d.ts +0 -1
  667. package/dist/tests/fourslash/signature.cornercases.fourslash.js.map +1 -1
  668. package/dist/tests/fourslash/signature.docstrings.fourslash.d.ts +0 -1
  669. package/dist/tests/fourslash/signature.docstrings.fourslash.js.map +1 -1
  670. package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.d.ts +0 -1
  671. package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js.map +1 -1
  672. package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.d.ts +0 -1
  673. package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js.map +1 -1
  674. package/dist/tests/fourslash/signature.dunderNew.fourslash.d.ts +0 -1
  675. package/dist/tests/fourslash/signature.dunderNew.fourslash.js.map +1 -1
  676. package/dist/tests/fourslash/signature.overload.fourslash.d.ts +0 -1
  677. package/dist/tests/fourslash/signature.overload.fourslash.js.map +1 -1
  678. package/dist/tests/fourslash/signature.simple.fourslash.d.ts +0 -1
  679. package/dist/tests/fourslash/signature.simple.fourslash.js.map +1 -1
  680. package/dist/tests/fourslash/typeVerifier.fourslash.d.ts +0 -1
  681. package/dist/tests/fourslash/typeVerifier.fourslash.js.map +1 -1
  682. package/dist/tests/harness/fourslash/fourSlashParser.js +1 -2
  683. package/dist/tests/harness/fourslash/fourSlashParser.js.map +1 -1
  684. package/dist/tests/harness/fourslash/fourSlashTypes.js.map +1 -1
  685. package/dist/tests/harness/fourslash/runner.d.ts +0 -1
  686. package/dist/tests/harness/fourslash/runner.js +2 -3
  687. package/dist/tests/harness/fourslash/runner.js.map +1 -1
  688. package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -1
  689. package/dist/tests/harness/fourslash/testState.js +7 -7
  690. package/dist/tests/harness/fourslash/testState.js.map +1 -1
  691. package/dist/tests/harness/fourslash/testStateUtils.js +4 -5
  692. package/dist/tests/harness/fourslash/testStateUtils.js.map +1 -1
  693. package/dist/tests/harness/fourslash/workspaceEditTestUtils.js +7 -8
  694. package/dist/tests/harness/fourslash/workspaceEditTestUtils.js.map +1 -1
  695. package/dist/tests/harness/testHost.js.map +1 -1
  696. package/dist/tests/harness/utils.d.ts +0 -2
  697. package/dist/tests/harness/utils.js +7 -7
  698. package/dist/tests/harness/utils.js.map +1 -1
  699. package/dist/tests/harness/vfs/factory.js +3 -3
  700. package/dist/tests/harness/vfs/factory.js.map +1 -1
  701. package/dist/tests/harness/vfs/filesystem.d.ts +0 -2
  702. package/dist/tests/harness/vfs/filesystem.js +2 -2
  703. package/dist/tests/harness/vfs/filesystem.js.map +1 -1
  704. package/dist/tests/harness/vfs/pathValidation.js +2 -2
  705. package/dist/tests/harness/vfs/pathValidation.js.map +1 -1
  706. package/dist/tests/importResolver.test.js.map +1 -1
  707. package/dist/tests/importStatementUtils.test.js.map +1 -1
  708. package/dist/tests/ipythonMode.test.js.map +1 -1
  709. package/dist/tests/languageServer.test.js.map +1 -1
  710. package/dist/tests/localizer.test.js.map +1 -1
  711. package/dist/tests/lsp/languageServer.js +1 -2
  712. package/dist/tests/lsp/languageServer.js.map +1 -1
  713. package/dist/tests/lsp/languageServerTestUtils.js +14 -14
  714. package/dist/tests/lsp/languageServerTestUtils.js.map +1 -1
  715. package/dist/tests/lsp/webpack.testserver.config.d.ts +2 -2
  716. package/dist/tests/parseTreeUtils.test.js.map +1 -1
  717. package/dist/tests/pathUtils.test.js.map +1 -1
  718. package/dist/tests/pyrightFileSystem.test.js.map +1 -1
  719. package/dist/tests/serialization.test.js +1 -2
  720. package/dist/tests/serialization.test.js.map +1 -1
  721. package/dist/tests/sourceMapperUtils.test.js.map +1 -1
  722. package/dist/tests/testStateUtils.js +5 -6
  723. package/dist/tests/testStateUtils.js.map +1 -1
  724. package/dist/tests/testUtils.js +8 -9
  725. package/dist/tests/testUtils.js.map +1 -1
  726. package/dist/tests/textEditUtil.test.js.map +1 -1
  727. package/dist/tests/tokenizer.test.js.map +1 -1
  728. package/dist/tests/typeEvaluator1.test.js +7 -7
  729. package/dist/tests/typeEvaluator1.test.js.map +1 -1
  730. package/dist/tests/typeEvaluator2.test.js +20 -0
  731. package/dist/tests/typeEvaluator2.test.js.map +1 -1
  732. package/dist/tests/typeEvaluator3.test.js +6 -2
  733. package/dist/tests/typeEvaluator3.test.js.map +1 -1
  734. package/dist/tests/typeEvaluator4.test.js +3 -3
  735. package/dist/tests/typeEvaluator5.test.js +1 -1
  736. package/dist/tests/typeEvaluator6.test.js +17 -9
  737. package/dist/tests/typeEvaluator6.test.js.map +1 -1
  738. package/dist/tests/typeEvaluator7.test.js +4 -0
  739. package/dist/tests/typeEvaluator7.test.js.map +1 -1
  740. package/dist/tests/typeEvaluator8.test.js +4 -0
  741. package/dist/tests/typeEvaluator8.test.js.map +1 -1
  742. package/dist/tests/uri.test.js.map +1 -1
  743. package/dist/workspaceFactory.js +3 -3
  744. package/dist/workspaceFactory.js.map +1 -1
  745. package/package.json +2 -2
  746. package/dist/analyzer/typeVarContext.d.ts +0 -48
  747. package/dist/analyzer/typeVarContext.js +0 -288
  748. package/dist/analyzer/typeVarContext.js.map +0 -1
@@ -6,14 +6,14 @@ import { TextRange } from '../common/textRange';
6
6
  import { ArgCategory, ArgumentNode, CallNode, CaseNode, ClassNode, DecoratorNode, ExpressionNode, FunctionNode, MatchNode, NameNode, ParamCategory, ParameterNode, ParseNode, RaiseNode, StringNode } from '../parser/parseNodes';
7
7
  import { AnalyzerFileInfo } from './analyzerFileInfo';
8
8
  import { CodeFlowReferenceExpressionNode, FlowNode } from './codeFlowTypes';
9
+ import { ConstraintTracker } from './constraintTracker';
9
10
  import { Declaration } from './declaration';
10
11
  import * as DeclarationUtils from './declarationUtils';
11
12
  import { SymbolWithScope } from './scope';
12
13
  import { Symbol } from './symbol';
13
14
  import { PrintTypeFlags } from './typePrinter';
15
+ import { AnyType, ClassType, FunctionParam, FunctionType, OverloadedType, Type, TypeCondition, TypeVarScopeId, TypeVarType, UnknownType, Variance } from './types';
14
16
  import { AssignTypeFlags, ClassMember, InferenceContext, MemberAccessFlags } from './typeUtils';
15
- import { TypeVarContext } from './typeVarContext';
16
- import { AnyType, ClassType, FunctionParam, FunctionType, OverloadedFunctionType, Type, TypeCondition, TypeVarType, UnknownType, Variance } from './types';
17
17
  export declare const maxSubtypesForInferredType = 64;
18
18
  export declare const enum EvalFlags {
19
19
  None = 0,
@@ -68,6 +68,7 @@ export interface TypeResult<T extends Type = Type> {
68
68
  isReadOnly?: boolean;
69
69
  overloadsUsedForCall?: FunctionType[];
70
70
  memberAccessDeprecationInfo?: MemberAccessDeprecationInfo;
71
+ magicMethodDeprecationInfo?: MagicMethodDeprecationInfo;
71
72
  }
72
73
  export interface TypeResultWithNode extends TypeResult {
73
74
  node: ParseNode;
@@ -77,6 +78,11 @@ export interface MemberAccessDeprecationInfo {
77
78
  accessMethod: 'get' | 'set' | 'del';
78
79
  deprecatedMessage: string;
79
80
  }
81
+ export interface MagicMethodDeprecationInfo {
82
+ className: string;
83
+ methodName: string;
84
+ deprecatedMessage: string;
85
+ }
80
86
  export interface EvaluatorUsage {
81
87
  method: 'get' | 'set' | 'del';
82
88
  setType?: TypeResult | undefined;
@@ -174,7 +180,6 @@ export interface ArgResult {
174
180
  argType: Type;
175
181
  isTypeIncomplete?: boolean | undefined;
176
182
  condition?: TypeCondition[];
177
- skippedOverloadArg?: boolean;
178
183
  skippedBareTypeVarExpectedType?: boolean;
179
184
  }
180
185
  export interface CallResult {
@@ -199,6 +204,19 @@ export interface ClassMemberLookup {
199
204
  narrowedTypeForSet?: Type;
200
205
  memberAccessDeprecationInfo?: MemberAccessDeprecationInfo;
201
206
  }
207
+ export interface SolveConstraintsOptions {
208
+ useLowerBoundOnly?: boolean;
209
+ }
210
+ export interface ApplyTypeVarOptions {
211
+ typeClassType?: ClassType;
212
+ replaceUnsolved?: {
213
+ scopeIds: TypeVarScopeId[];
214
+ tupleClassType: ClassType | undefined;
215
+ unsolvedExemptTypeVars?: TypeVarType[];
216
+ useUnknown?: boolean;
217
+ eliminateUnsolvedInUnions?: boolean;
218
+ };
219
+ }
202
220
  export declare enum Reachability {
203
221
  Reachable = 0,
204
222
  UnreachableAlways = 1,
@@ -260,10 +278,11 @@ export interface TypeEvaluator {
260
278
  removeTruthinessFromType: (type: Type) => Type;
261
279
  removeFalsinessFromType: (type: Type) => Type;
262
280
  stripTypeGuard: (type: Type) => Type;
281
+ solveAndApplyConstraints: (type: Type, constraints: ConstraintTracker, applyOptions?: ApplyTypeVarOptions, solveOptions?: SolveConstraintsOptions) => Type;
263
282
  getExpectedType: (node: ExpressionNode) => ExpectedTypeResult | undefined;
264
283
  verifyRaiseExceptionType: (node: RaiseNode) => void;
265
284
  verifyDeleteExpression: (node: ExpressionNode) => void;
266
- validateOverloadedArgTypes: (errorNode: ExpressionNode, argList: Arg[], typeResult: TypeResult<OverloadedFunctionType>, typeVarContext: TypeVarContext | undefined, skipUnknownArgCheck: boolean, inferenceContext: InferenceContext | undefined) => CallResult;
285
+ validateOverloadedArgTypes: (errorNode: ExpressionNode, argList: Arg[], typeResult: TypeResult<OverloadedType>, constraints: ConstraintTracker | undefined, skipUnknownArgCheck: boolean, inferenceContext: InferenceContext | undefined) => CallResult;
267
286
  validateInitSubclassArgs: (node: ClassNode, classType: ClassType) => void;
268
287
  isNodeReachable: (node: ParseNode, sourceNode?: ParseNode | undefined) => boolean;
269
288
  isAfterNodeReachable: (node: ParseNode) => boolean;
@@ -294,19 +313,19 @@ export interface TypeEvaluator {
294
313
  getDeclaredTypeForExpression: (expression: ExpressionNode, usage?: EvaluatorUsage) => Type | undefined;
295
314
  getFunctionDeclaredReturnType: (node: FunctionNode) => Type | undefined;
296
315
  getFunctionInferredReturnType: (type: FunctionType, callSiteInfo?: CallSiteEvaluationInfo) => Type;
297
- getBestOverloadForArgs: (errorNode: ExpressionNode, typeResult: TypeResult<OverloadedFunctionType>, argList: Arg[]) => FunctionType | undefined;
316
+ getBestOverloadForArgs: (errorNode: ExpressionNode, typeResult: TypeResult<OverloadedType>, argList: Arg[]) => FunctionType | undefined;
298
317
  getBuiltInType: (node: ParseNode, name: string) => Type;
299
318
  getTypeOfMember: (member: ClassMember) => Type;
300
319
  getTypeOfBoundMember(errorNode: ExpressionNode, objectType: ClassType, memberName: string, usage?: EvaluatorUsage, diag?: DiagnosticAddendum | undefined, flags?: MemberAccessFlags, selfType?: ClassType | TypeVarType): TypeResult | undefined;
301
- getBoundMagicMethod: (classType: ClassType, memberName: string, selfType?: ClassType | TypeVarType | undefined, diag?: DiagnosticAddendum, recursionCount?: number) => FunctionType | OverloadedFunctionType | undefined;
302
- getTypeOfMagicMethodCall: (objType: Type, methodName: string, argList: TypeResult[], errorNode: ExpressionNode, inferenceContext: InferenceContext | undefined) => Type | undefined;
303
- bindFunctionToClassOrObject: (baseType: ClassType | undefined, memberType: FunctionType | OverloadedFunctionType, memberClass?: ClassType, treatConstructorAsClassMethod?: boolean, selfType?: ClassType | TypeVarType, diag?: DiagnosticAddendum, recursionCount?: number) => FunctionType | OverloadedFunctionType | undefined;
320
+ getBoundMagicMethod: (classType: ClassType, memberName: string, selfType?: ClassType | TypeVarType | undefined, diag?: DiagnosticAddendum, recursionCount?: number) => FunctionType | OverloadedType | undefined;
321
+ getTypeOfMagicMethodCall: (objType: Type, methodName: string, argList: TypeResult[], errorNode: ExpressionNode, inferenceContext: InferenceContext | undefined) => TypeResult | undefined;
322
+ bindFunctionToClassOrObject: (baseType: ClassType | undefined, memberType: FunctionType | OverloadedType, memberClass?: ClassType, treatConstructorAsClassMethod?: boolean, selfType?: ClassType | TypeVarType, diag?: DiagnosticAddendum, recursionCount?: number) => FunctionType | OverloadedType | undefined;
304
323
  getCallSignatureInfo: (node: CallNode, activeIndex: number, activeOrFake: boolean) => CallSignatureInfo | undefined;
305
324
  getAbstractSymbols: (classType: ClassType) => AbstractSymbol[];
306
325
  narrowConstrainedTypeVar: (node: ParseNode, typeVar: TypeVarType) => Type | undefined;
307
- assignType: (destType: Type, srcType: Type, diag?: DiagnosticAddendum, destTypeVarContext?: TypeVarContext, srcTypeVarContext?: TypeVarContext, flags?: AssignTypeFlags, recursionCount?: number) => boolean;
308
- validateOverrideMethod: (baseMethod: Type, overrideMethod: FunctionType | OverloadedFunctionType, baseClass: ClassType | undefined, diag: DiagnosticAddendum, enforceParamNames?: boolean) => boolean;
309
- validateCallArgs: (errorNode: ExpressionNode, argList: Arg[], callTypeResult: TypeResult, typeVarContext: TypeVarContext | undefined, skipUnknownArgCheck: boolean | undefined, inferenceContext: InferenceContext | undefined) => CallResult;
326
+ assignType: (destType: Type, srcType: Type, diag?: DiagnosticAddendum, constraints?: ConstraintTracker, flags?: AssignTypeFlags, recursionCount?: number) => boolean;
327
+ validateOverrideMethod: (baseMethod: Type, overrideMethod: FunctionType | OverloadedType, baseClass: ClassType | undefined, diag: DiagnosticAddendum, enforceParamNames?: boolean) => boolean;
328
+ validateCallArgs: (errorNode: ExpressionNode, argList: Arg[], callTypeResult: TypeResult, constraints: ConstraintTracker | undefined, skipUnknownArgCheck: boolean | undefined, inferenceContext: InferenceContext | undefined) => CallResult;
310
329
  validateTypeArg: (argResult: TypeResultWithNode, options?: ValidateTypeArgsOptions) => boolean;
311
330
  assignTypeToExpression: (target: ExpressionNode, typeResult: TypeResult, srcExpr: ExpressionNode) => void;
312
331
  assignClassToSelf: (destType: ClassType, srcType: ClassType, assumedVariance: Variance) => boolean;
@@ -320,7 +339,7 @@ export interface TypeEvaluator {
320
339
  getTypingType: (node: ParseNode, symbolName: string) => Type | undefined;
321
340
  inferReturnTypeIfNecessary: (type: Type) => void;
322
341
  inferVarianceForClass: (type: ClassType) => void;
323
- assignTypeArgs: (destType: ClassType, srcType: ClassType, diag: DiagnosticAddendum | undefined, destTypeVarContext: TypeVarContext | undefined, srcTypeVarContext: TypeVarContext | undefined, flags: AssignTypeFlags, recursionCount: number) => boolean;
342
+ assignTypeArgs: (destType: ClassType, srcType: ClassType, diag: DiagnosticAddendum | undefined, constraints: ConstraintTracker | undefined, flags: AssignTypeFlags, recursionCount: number) => boolean;
324
343
  reportMissingTypeArgs: (node: ExpressionNode, type: Type, flags: EvalFlags) => Type;
325
344
  isFinalVariable: (symbol: Symbol) => boolean;
326
345
  isFinalVariableDeclaration: (decl: Declaration) => boolean;
@@ -344,5 +363,4 @@ export interface TypeEvaluator {
344
363
  setTypeResultForNode: (node: ParseNode, typeResult: TypeResult, flags?: EvalFlags) => void;
345
364
  checkForCancellation: () => void;
346
365
  printControlFlowGraph: (flowNode: FlowNode, reference: CodeFlowReferenceExpressionNode | undefined, callName: string, logger: ConsoleInterface) => void;
347
- printTypeVarContext: (typeVarContext: TypeVarContext) => void;
348
366
  }
@@ -1 +1 @@
1
- {"version":3,"file":"typeEvaluatorTypes.js","sourceRoot":"","sources":["../../../../../src/analyzer/typeEvaluatorTypes.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AA+CH,gEAAgE;AAChE,kDAAkD;AACrC,QAAA,0BAA0B,GAAG,EAAE,CAAC;AAE7C,IAAkB,SAgIjB;AAhID,WAAkB,SAAS;IACvB,yCAAQ,CAAA;IAER,uDAAuD;IACvD,yEAA6B,CAAA;IAE7B,0DAA0D;IAC1D,gEAAgE;IAChE,SAAS;IACT,yDAAqB,CAAA;IAErB,yDAAyD;IACzD,uDAAoB,CAAA;IAEpB,kCAAkC;IAClC,iEAAyB,CAAA;IAEzB,0CAA0C;IAC1C,gDAAgB,CAAA;IAEhB,6CAA6C;IAC7C,wDAAoB,CAAA;IAEpB,gDAAgD;IAChD,8DAAuB,CAAA;IAEvB,2DAA2D;IAC3D,4BAA4B;IAC5B,mEAAyB,CAAA;IAEzB,kEAAkE;IAClE,gEAAgE;IAChE,qBAAqB;IACrB,+DAAuB,CAAA;IAEvB,qEAAqE;IACrE,2EAA6B,CAAA;IAE7B,2DAA2D;IAC3D,gDAAgD;IAChD,4DAAsB,CAAA;IAEtB,8DAA8D;IAC9D,0BAA0B;IAC1B,4EAA8B,CAAA;IAE9B,oEAAoE;IACpE,0BAA0B;IAC1B,wFAAoC,CAAA;IAEpC,yDAAyD;IACzD,2DAA2D;IAC3D,mCAAmC;IACnC,0EAA6B,CAAA;IAE7B,yDAAyD;IACzD,6DAA6D;IAC7D,uDAAuD;IACvD,yFAAoC,CAAA;IAEpC,mDAAmD;IACnD,uEAA2B,CAAA;IAE3B,6CAA6C;IAC7C,0DAAoB,CAAA;IAEpB,mEAAmE;IACnE,kEAAwB,CAAA;IAExB,iEAAiE;IACjE,iCAAiC;IACjC,wDAAmB,CAAA;IAEnB,wDAAwD;IACxD,iEAAuB,CAAA;IAEvB,uDAAuD;IACvD,2EAA4B,CAAA;IAE5B,yCAAyC;IACzC,mFAAgC,CAAA;IAEhC,6DAA6D;IAC7D,2DAA2D;IAC3D,oDAAoD;IACpD,6EAA6B,CAAA;IAE7B,8DAA8D;IAC9D,iDAAiD;IACjD,gFAA8B,CAAA;IAE9B,oEAAoE;IACpE,mBAAmB;IACnB,kFAA+B,CAAA;IAE/B,6CAA6C;IAC7C,yEAA0B,CAAA;IAE1B,2EAA2E;IAC3E,4BAA4B;IAC5B,6EAA4B,CAAA;IAE5B,sEAAsE;IACtE,+DAA+D;IAC/D,mEAAuB,CAAA;IAEvB,yEAAyE;IACzE,8CAA8C;IAC9C,0FAAkC,CAAA;IAElC,6DAA6D;IAC7D,iEAA+B,CAAA;IAE/B,sEAAsE;IACtE,mEAAgC,CAAA;IAEhC,sEAAsE;IACtE,iFAAuC,CAAA;IAEvC,sEAAsE;IACtE,wBAAwB;IACxB,mFAMiB,CAAA;AACrB,CAAC,EAhIiB,SAAS,yBAAT,SAAS,QAgI1B;AA8PD,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,yDAAS,CAAA;IACT,yEAAiB,CAAA;IACjB,iFAAqB,CAAA;AACzB,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
1
+ {"version":3,"file":"typeEvaluatorTypes.js","sourceRoot":"","sources":["../../../../../src/analyzer/typeEvaluatorTypes.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAgDH,gEAAgE;AAChE,kDAAkD;AACrC,QAAA,0BAA0B,GAAG,EAAE,CAAC;AAE7C,IAAkB,SAgIjB;AAhID,WAAkB,SAAS;IACvB,yCAAQ,CAAA;IAER,uDAAuD;IACvD,yEAA6B,CAAA;IAE7B,0DAA0D;IAC1D,gEAAgE;IAChE,SAAS;IACT,yDAAqB,CAAA;IAErB,yDAAyD;IACzD,uDAAoB,CAAA;IAEpB,kCAAkC;IAClC,iEAAyB,CAAA;IAEzB,0CAA0C;IAC1C,gDAAgB,CAAA;IAEhB,6CAA6C;IAC7C,wDAAoB,CAAA;IAEpB,gDAAgD;IAChD,8DAAuB,CAAA;IAEvB,2DAA2D;IAC3D,4BAA4B;IAC5B,mEAAyB,CAAA;IAEzB,kEAAkE;IAClE,gEAAgE;IAChE,qBAAqB;IACrB,+DAAuB,CAAA;IAEvB,qEAAqE;IACrE,2EAA6B,CAAA;IAE7B,2DAA2D;IAC3D,gDAAgD;IAChD,4DAAsB,CAAA;IAEtB,8DAA8D;IAC9D,0BAA0B;IAC1B,4EAA8B,CAAA;IAE9B,oEAAoE;IACpE,0BAA0B;IAC1B,wFAAoC,CAAA;IAEpC,yDAAyD;IACzD,2DAA2D;IAC3D,mCAAmC;IACnC,0EAA6B,CAAA;IAE7B,yDAAyD;IACzD,6DAA6D;IAC7D,uDAAuD;IACvD,yFAAoC,CAAA;IAEpC,mDAAmD;IACnD,uEAA2B,CAAA;IAE3B,6CAA6C;IAC7C,0DAAoB,CAAA;IAEpB,mEAAmE;IACnE,kEAAwB,CAAA;IAExB,iEAAiE;IACjE,iCAAiC;IACjC,wDAAmB,CAAA;IAEnB,wDAAwD;IACxD,iEAAuB,CAAA;IAEvB,uDAAuD;IACvD,2EAA4B,CAAA;IAE5B,yCAAyC;IACzC,mFAAgC,CAAA;IAEhC,6DAA6D;IAC7D,2DAA2D;IAC3D,oDAAoD;IACpD,6EAA6B,CAAA;IAE7B,8DAA8D;IAC9D,iDAAiD;IACjD,gFAA8B,CAAA;IAE9B,oEAAoE;IACpE,mBAAmB;IACnB,kFAA+B,CAAA;IAE/B,6CAA6C;IAC7C,yEAA0B,CAAA;IAE1B,2EAA2E;IAC3E,4BAA4B;IAC5B,6EAA4B,CAAA;IAE5B,sEAAsE;IACtE,+DAA+D;IAC/D,mEAAuB,CAAA;IAEvB,yEAAyE;IACzE,8CAA8C;IAC9C,0FAAkC,CAAA;IAElC,6DAA6D;IAC7D,iEAA+B,CAAA;IAE/B,sEAAsE;IACtE,mEAAgC,CAAA;IAEhC,sEAAsE;IACtE,iFAAuC,CAAA;IAEvC,sEAAsE;IACtE,wBAAwB;IACxB,mFAMiB,CAAA;AACrB,CAAC,EAhIiB,SAAS,yBAAT,SAAS,QAgI1B;AAqRD,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,yDAAS,CAAA;IACT,yEAAiB,CAAA;IACjB,iFAAqB,CAAA;AACzB,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
@@ -9,7 +9,7 @@
9
9
  * Wraps type evaluator to track performance of internal calls.
10
10
  */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.createTypeEvaluatorWithTracker = void 0;
12
+ exports.createTypeEvaluatorWithTracker = createTypeEvaluatorWithTracker;
13
13
  const console_1 = require("../common/console");
14
14
  const core_1 = require("../common/core");
15
15
  const timing_1 = require("../common/timing");
@@ -58,5 +58,4 @@ function createTypeEvaluatorWithTracker(importLookup, evaluatorOptions, logger,
58
58
  });
59
59
  return evaluator;
60
60
  }
61
- exports.createTypeEvaluatorWithTracker = createTypeEvaluatorWithTracker;
62
61
  //# sourceMappingURL=typeEvaluatorWithTracker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeEvaluatorWithTracker.js","sourceRoot":"","sources":["../../../../../src/analyzer/typeEvaluatorWithTracker.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,+CAA6C;AAC7C,yCAA6C;AAE7C,6CAA+C;AAG/C,mDAAwE;AAExE,sFAAsF;AACtF,SAAgB,8BAA8B,CAC1C,YAA0B,EAC1B,gBAAkC,EAClC,MAAkB,EAClB,OAAsB;IAEtB,SAAS,cAAc,CAAoC,IAAO;QAC9D,oEAAoE;QACpE,kCAAkC;QAClC,IAAI,gBAAgB,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,kBAAQ,CAAC,GAAG,EAAE;YAC/D,OAAO,CAAC,GAAG,IAAmB,EAAiB,EAAE;gBAC7C,OAAO,MAAM,CAAC,GAAG,CACb,IAAI,CAAC,IAAI,EACT,CAAC,CAAC,EAAE,EAAE;oBACF,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;wBACjD,mDAAmD;wBACnD,CAAC,CAAC,GAAG,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;qBAClD;yBAAM;wBACH,wBAAwB;wBACxB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;4BACf,CAAC,CAAC,GAAG,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;wBAC7B,CAAC,CAAC,CAAC;qBACN;oBACD,OAAO,oBAAW,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;gBACvE,CAAC,EACD,gBAAgB,CAAC,uBAAuB;gBACxC,oBAAoB,CAAC,IAAI,CAC5B,CAAC;YACN,CAAC,CAAC;SACL;aAAM,IAAI,CAAC,IAAA,kBAAW,GAAE,EAAE;YACvB,OAAO,oBAAW,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,CAAC,oBAAW,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;SAClG;aAAM;YACH,OAAO,IAAI,CAAC;SACf;IACL,CAAC;IAED,sDAAsD;IACtD,YAAY,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,IAAA,mCAAmB,EAAC,YAAY,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;IAEtF,qFAAqF;IACrF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACf,MAAM,KAAK,GAAI,SAAiB,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,OAAO,KAAK,KAAK,UAAU,IAAI,KAAK,CAAC,IAAI,EAAE;YAC3C,mDAAmD;YAClD,SAAiB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;SACjD;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACrB,CAAC;AAnDD,wEAmDC"}
1
+ {"version":3,"file":"typeEvaluatorWithTracker.js","sourceRoot":"","sources":["../../../../../src/analyzer/typeEvaluatorWithTracker.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAWH,wEAmDC;AA5DD,+CAA6C;AAC7C,yCAA6C;AAE7C,6CAA+C;AAG/C,mDAAwE;AAExE,sFAAsF;AACtF,SAAgB,8BAA8B,CAC1C,YAA0B,EAC1B,gBAAkC,EAClC,MAAkB,EAClB,OAAsB;IAEtB,SAAS,cAAc,CAAoC,IAAO;QAC9D,oEAAoE;QACpE,kCAAkC;QAClC,IAAI,gBAAgB,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,kBAAQ,CAAC,GAAG,EAAE,CAAC;YAChE,OAAO,CAAC,GAAG,IAAmB,EAAiB,EAAE;gBAC7C,OAAO,MAAM,CAAC,GAAG,CACb,IAAI,CAAC,IAAI,EACT,CAAC,CAAC,EAAE,EAAE;oBACF,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBAClD,mDAAmD;wBACnD,CAAC,CAAC,GAAG,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACnD,CAAC;yBAAM,CAAC;wBACJ,wBAAwB;wBACxB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;4BACf,CAAC,CAAC,GAAG,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;wBAC7B,CAAC,CAAC,CAAC;oBACP,CAAC;oBACD,OAAO,oBAAW,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;gBACvE,CAAC,EACD,gBAAgB,CAAC,uBAAuB;gBACxC,oBAAoB,CAAC,IAAI,CAC5B,CAAC;YACN,CAAC,CAAC;QACN,CAAC;aAAM,IAAI,CAAC,IAAA,kBAAW,GAAE,EAAE,CAAC;YACxB,OAAO,oBAAW,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,CAAC,oBAAW,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;QACnG,CAAC;aAAM,CAAC;YACJ,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,sDAAsD;IACtD,YAAY,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,IAAA,mCAAmB,EAAC,YAAY,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;IAEtF,qFAAqF;IACrF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACf,MAAM,KAAK,GAAI,SAAiB,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,OAAO,KAAK,KAAK,UAAU,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;YAC5C,mDAAmD;YAClD,SAAiB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QAClD,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -33,11 +33,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
33
33
  return result;
34
34
  };
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.func1 = exports.Tree = exports.Plant = exports.Dog = exports.Animal = exports.enumerateLiteralsForType = exports.narrowTypeForDiscriminatedLiteralFieldComparison = exports.narrowTypeForDiscriminatedTupleComparison = exports.narrowTypeForDiscriminatedDictEntryComparison = exports.narrowTypeForContainerElementType = exports.getElementTypeForContainerNarrowing = exports.isIsinstanceFilterSubclass = exports.isIsinstanceFilterSuperclass = exports.getTypeNarrowingCallback = void 0;
36
+ exports.Tree = exports.Plant = exports.Dog = exports.Animal = void 0;
37
+ exports.getTypeNarrowingCallback = getTypeNarrowingCallback;
38
+ exports.isIsinstanceFilterSuperclass = isIsinstanceFilterSuperclass;
39
+ exports.isIsinstanceFilterSubclass = isIsinstanceFilterSubclass;
40
+ exports.getElementTypeForContainerNarrowing = getElementTypeForContainerNarrowing;
41
+ exports.narrowTypeForContainerElementType = narrowTypeForContainerElementType;
42
+ exports.narrowTypeForDiscriminatedDictEntryComparison = narrowTypeForDiscriminatedDictEntryComparison;
43
+ exports.narrowTypeForDiscriminatedTupleComparison = narrowTypeForDiscriminatedTupleComparison;
44
+ exports.narrowTypeForDiscriminatedLiteralFieldComparison = narrowTypeForDiscriminatedLiteralFieldComparison;
45
+ exports.enumerateLiteralsForType = enumerateLiteralsForType;
46
+ exports.func1 = func1;
37
47
  const debug_1 = require("../common/debug");
38
48
  const parseNodes_1 = require("../parser/parseNodes");
39
49
  const analyzerNodeInfo_1 = require("./analyzerNodeInfo");
40
50
  const constraintSolver_1 = require("./constraintSolver");
51
+ const constraintTracker_1 = require("./constraintTracker");
41
52
  const enums_1 = require("./enums");
42
53
  const ParseTreeUtils = __importStar(require("./parseTreeUtils"));
43
54
  const scopeUtils_1 = require("./scopeUtils");
@@ -45,7 +56,6 @@ const symbol_1 = require("./symbol");
45
56
  const typedDicts_1 = require("./typedDicts");
46
57
  const types_1 = require("./types");
47
58
  const typeUtils_1 = require("./typeUtils");
48
- const typeVarContext_1 = require("./typeVarContext");
49
59
  // Given a reference expression and a test expression, returns a callback that
50
60
  // can be used to narrow the type described by the reference expression.
51
61
  // If the specified flow node is not associated with the test expression,
@@ -477,8 +487,8 @@ function getTypeNarrowingCallback(evaluator, reference, testExpression, isPositi
477
487
  if ((0, types_1.isFunction)(callType) && isFunctionReturnTypeGuard(callType)) {
478
488
  isPossiblyTypeGuard = true;
479
489
  }
480
- else if ((0, types_1.isOverloadedFunction)(callType) &&
481
- types_1.OverloadedFunctionType.getOverloads(callType).some((o) => isFunctionReturnTypeGuard(o))) {
490
+ else if ((0, types_1.isOverloaded)(callType) &&
491
+ types_1.OverloadedType.getOverloads(callType).some((o) => isFunctionReturnTypeGuard(o))) {
482
492
  isPossiblyTypeGuard = true;
483
493
  }
484
494
  else if ((0, types_1.isClassInstance)(callType)) {
@@ -531,7 +541,6 @@ function getTypeNarrowingCallback(evaluator, reference, testExpression, isPositi
531
541
  }
532
542
  return undefined;
533
543
  }
534
- exports.getTypeNarrowingCallback = getTypeNarrowingCallback;
535
544
  function getTypeNarrowingCallbackForAliasedCondition(evaluator, reference, testExpression, isPositiveTest, recursionCount) {
536
545
  if (testExpression.nodeType !== 38 /* ParseNodeType.Name */ ||
537
546
  reference.nodeType !== 38 /* ParseNodeType.Name */ ||
@@ -630,7 +639,7 @@ function narrowTypeForUserDefinedTypeGuard(evaluator, type, typeGuardType, isPos
630
639
  result = typeGuardType;
631
640
  // If the type guard is a non-constrained TypeVar, add a
632
641
  // condition to the resulting type.
633
- if ((0, types_1.isTypeVar)(type) && !(0, types_1.isParamSpec)(type) && type.shared.constraints.length === 0) {
642
+ if ((0, types_1.isTypeVar)(type) && !(0, types_1.isParamSpec)(type) && !types_1.TypeVarType.hasConstraints(type)) {
634
643
  result = (0, typeUtils_1.addConditionToType)(result, [{ typeVar: type, constraintIndex: 0 }]);
635
644
  }
636
645
  return result;
@@ -697,32 +706,40 @@ function narrowTypeForIsNone(evaluator, type, isPositiveTest) {
697
706
  /* options */ undefined, (subtype, unexpandedSubtype) => {
698
707
  var _a;
699
708
  if ((0, types_1.isAnyOrUnknown)(subtype)) {
700
- // We need to assume that "Any" is always both None and not None,
701
- // so it matches regardless of whether the test is positive or negative.
709
+ // Assume that "Any" is always both None and not None, so it matches
710
+ // regardless of whether the test is positive or negative.
702
711
  return subtype;
703
712
  }
704
- // If this is a TypeVar that isn't constrained, use the unexpanded
705
- // TypeVar. For all other cases (including constrained TypeVars),
706
- // use the expanded subtype.
707
- const adjustedSubtype = (0, types_1.isTypeVar)(unexpandedSubtype) && unexpandedSubtype.shared.constraints.length === 0
708
- ? unexpandedSubtype
709
- : subtype;
710
- // See if it's a match for object.
711
- if ((0, types_1.isClassInstance)(subtype) && types_1.ClassType.isBuiltIn(subtype, 'object')) {
713
+ let useExpandedSubtype = false;
714
+ if ((0, types_1.isTypeVar)(unexpandedSubtype) && !types_1.TypeVarType.isSelf(unexpandedSubtype)) {
715
+ // If the TypeVar has value constraints and one or more of them
716
+ // are possibly compatible with None, use the expanded subtypes.
717
+ if (unexpandedSubtype.shared.constraints.some((constraint) => {
718
+ return evaluator.assignType(constraint, evaluator.getNoneType());
719
+ })) {
720
+ useExpandedSubtype = true;
721
+ }
722
+ // If the TypeVar han an explicit bound that is possibly compatible
723
+ // with None (e.g. "T: int | None"), use the expanded subtypes.
724
+ if (unexpandedSubtype.shared.boundType &&
725
+ evaluator.assignType(unexpandedSubtype.shared.boundType, evaluator.getNoneType())) {
726
+ useExpandedSubtype = true;
727
+ }
728
+ }
729
+ const adjustedSubtype = useExpandedSubtype ? subtype : unexpandedSubtype;
730
+ // Is it an exact match for None?
731
+ if ((0, typeUtils_1.isNoneInstance)(subtype)) {
732
+ resultIncludesNoneSubtype = true;
733
+ return isPositiveTest ? adjustedSubtype : undefined;
734
+ }
735
+ // Is it potentially None?
736
+ if (evaluator.assignType(subtype, evaluator.getNoneType())) {
712
737
  resultIncludesNoneSubtype = true;
713
738
  return isPositiveTest
714
739
  ? (0, typeUtils_1.addConditionToType)(evaluator.getNoneType(), (_a = subtype.props) === null || _a === void 0 ? void 0 : _a.condition)
715
740
  : adjustedSubtype;
716
741
  }
717
- // See if it's a match for None.
718
- if ((0, typeUtils_1.isNoneInstance)(subtype) === isPositiveTest) {
719
- resultIncludesNoneSubtype = true;
720
- if ((0, types_1.isTypeVar)(adjustedSubtype) && adjustedSubtype.shared.isSynthesizedSelf) {
721
- return adjustedSubtype;
722
- }
723
- return subtype;
724
- }
725
- return undefined;
742
+ return isPositiveTest ? undefined : adjustedSubtype;
726
743
  });
727
744
  // If this is a positive test and the result is a union that includes None,
728
745
  // we can eliminate all the non-None subtypes include Any or Unknown. If some
@@ -749,7 +766,7 @@ function narrowTypeForIsEllipsis(evaluator, type, isPositiveTest) {
749
766
  // If this is a TypeVar that isn't constrained, use the unexpanded
750
767
  // TypeVar. For all other cases (including constrained TypeVars),
751
768
  // use the expanded subtype.
752
- const adjustedSubtype = (0, types_1.isTypeVar)(unexpandedSubtype) && unexpandedSubtype.shared.constraints.length === 0
769
+ const adjustedSubtype = (0, types_1.isTypeVar)(unexpandedSubtype) && !types_1.TypeVarType.hasConstraints(unexpandedSubtype)
753
770
  ? unexpandedSubtype
754
771
  : subtype;
755
772
  // See if it's a match for object.
@@ -853,7 +870,6 @@ function isIsinstanceFilterSuperclass(evaluator, varType, concreteVarType, filte
853
870
  }
854
871
  return false;
855
872
  }
856
- exports.isIsinstanceFilterSuperclass = isIsinstanceFilterSuperclass;
857
873
  function isIsinstanceFilterSubclass(evaluator, varType, concreteFilterType, isInstanceCheck) {
858
874
  if (types_1.ClassType.isDerivedFrom(concreteFilterType, varType)) {
859
875
  return true;
@@ -869,7 +885,6 @@ function isIsinstanceFilterSubclass(evaluator, varType, concreteFilterType, isIn
869
885
  }
870
886
  return false;
871
887
  }
872
- exports.isIsinstanceFilterSubclass = isIsinstanceFilterSubclass;
873
888
  function narrowTypeForIsInstance(evaluator, type, filterTypes, isInstanceCheck, isTypeIsCheck, isPositiveTest, errorNode) {
874
889
  // First try with intersection types disallowed.
875
890
  const narrowedType = narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanceCheck, isTypeIsCheck, isPositiveTest,
@@ -891,6 +906,15 @@ function narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanc
891
906
  return (0, typeUtils_1.transformPossibleRecursiveTypeAlias)(subtype);
892
907
  });
893
908
  expandedTypes = evaluator.expandPromotionTypes(errorNode, expandedTypes);
909
+ const convertVarTypeToFree = (varType) => {
910
+ // If this is a TypeIs check, type variables should remain bound.
911
+ if (isTypeIsCheck) {
912
+ return varType;
913
+ }
914
+ // If this is an isinstance or issubclass check, the type variables
915
+ // should be converted to "free" type variables.
916
+ return (0, typeUtils_1.makeTypeVarsFree)(varType, ParseTreeUtils.getTypeVarScopesForNode(errorNode));
917
+ };
894
918
  // Filters the varType by the parameters of the isinstance
895
919
  // and returns the list of types the varType could be after
896
920
  // applying the filter.
@@ -941,7 +965,7 @@ function narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanc
941
965
  // If the variable type is a subclass of the isinstance filter,
942
966
  // we haven't learned anything new about the variable type.
943
967
  // If the varType is a Self or type[Self], retain the unnarrowedType.
944
- if ((0, types_1.isTypeVar)(varType) && varType.shared.isSynthesizedSelf) {
968
+ if ((0, types_1.isTypeVar)(varType) && types_1.TypeVarType.isSelf(varType)) {
945
969
  filteredTypes.push((0, typeUtils_1.addConditionToType)(varType, conditions));
946
970
  }
947
971
  else {
@@ -949,10 +973,9 @@ function narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanc
949
973
  }
950
974
  }
951
975
  else if (filterIsSubclass) {
952
- if (evaluator.assignType((0, typeUtils_1.convertToInstance)(concreteVarType), (0, typeUtils_1.convertToInstance)(concreteFilterType),
976
+ if (evaluator.assignType((0, typeUtils_1.convertToInstance)(convertVarTypeToFree(concreteVarType)), (0, typeUtils_1.convertToInstance)(concreteFilterType),
953
977
  /* diag */ undefined,
954
- /* destTypeVarContext */ undefined,
955
- /* srcTypeVarContext */ undefined, 1024 /* AssignTypeFlags.IgnoreTypeVarScope */ | 16384 /* AssignTypeFlags.AllowIsinstanceSpecialForms */)) {
978
+ /* constraints */ undefined, 16384 /* AssignTypeFlags.AllowIsinstanceSpecialForms */)) {
956
979
  // If the variable type is a superclass of the isinstance
957
980
  // filter, we can narrow the type to the subclass.
958
981
  let specializedFilterType = filterType;
@@ -963,15 +986,17 @@ function narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanc
963
986
  if (types_1.ClassType.isSpecialBuiltIn(filterType) || filterType.shared.typeParams.length > 0) {
964
987
  if (!filterType.priv.isTypeArgExplicit &&
965
988
  !types_1.ClassType.isSameGenericClass(concreteVarType, filterType)) {
966
- const typeVarContext = new typeVarContext_1.TypeVarContext((0, typeUtils_1.getTypeVarScopeId)(filterType));
989
+ const constraints = new constraintTracker_1.ConstraintTracker();
967
990
  const unspecializedFilterType = types_1.ClassType.specialize(filterType,
968
991
  /* typeArg */ undefined);
969
- if ((0, constraintSolver_1.addConstraintsForExpectedType)(evaluator, (0, typeUtils_1.convertToInstance)(unspecializedFilterType), (0, typeUtils_1.convertToInstance)(concreteVarType), typeVarContext,
992
+ if ((0, constraintSolver_1.addConstraintsForExpectedType)(evaluator, (0, typeUtils_1.convertToInstance)(unspecializedFilterType), (0, typeUtils_1.convertToInstance)(concreteVarType), constraints,
970
993
  /* liveTypeVarScopes */ undefined, errorNode.start)) {
971
- specializedFilterType = (0, typeUtils_1.applySolvedTypeVars)(unspecializedFilterType, typeVarContext, {
972
- unknownIfNotFound: true,
973
- useUnknownOverDefault: true,
974
- tupleClassType: evaluator.getTupleClassType(),
994
+ specializedFilterType = evaluator.solveAndApplyConstraints(unspecializedFilterType, constraints, {
995
+ replaceUnsolved: {
996
+ scopeIds: (0, typeUtils_1.getTypeVarScopeIds)(filterType),
997
+ useUnknown: true,
998
+ tupleClassType: evaluator.getTupleClassType(),
999
+ },
975
1000
  });
976
1001
  }
977
1002
  }
@@ -999,7 +1024,7 @@ function narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanc
999
1024
  // synthesize a new class type that represents an intersection of
1000
1025
  // the two types.
1001
1026
  let newClassType = evaluator.createSubclass(errorNode, concreteVarType, concreteFilterType);
1002
- if ((0, types_1.isTypeVar)(varType) && !(0, types_1.isParamSpec)(varType) && varType.shared.constraints.length === 0) {
1027
+ if ((0, types_1.isTypeVar)(varType) && !(0, types_1.isParamSpec)(varType) && !types_1.TypeVarType.hasConstraints(varType)) {
1003
1028
  newClassType = (0, typeUtils_1.addConditionToType)(newClassType, [{ typeVar: varType, constraintIndex: 0 }]);
1004
1029
  }
1005
1030
  let newClassObjType = types_1.ClassType.cloneAsInstance(newClassType);
@@ -1074,10 +1099,9 @@ function narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanc
1074
1099
  foundSuperclass = true;
1075
1100
  }
1076
1101
  }
1077
- else if (evaluator.assignType(concreteVarType, filterType,
1102
+ else if (evaluator.assignType(convertVarTypeToFree(concreteVarType), filterType,
1078
1103
  /* diag */ undefined,
1079
- /* destTypeVarContext */ undefined,
1080
- /* srcTypeVarContext */ undefined, 16384 /* AssignTypeFlags.AllowIsinstanceSpecialForms */)) {
1104
+ /* constraints */ undefined, 16384 /* AssignTypeFlags.AllowIsinstanceSpecialForms */)) {
1081
1105
  if (isPositiveTest) {
1082
1106
  filteredTypes.push(filterType);
1083
1107
  }
@@ -1115,7 +1139,7 @@ function narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanc
1115
1139
  if ((0, types_1.isInstantiableClass)(concreteFilterType)) {
1116
1140
  const filterMetaclass = concreteFilterType.shared.effectiveMetaclass;
1117
1141
  if (filterMetaclass && (0, types_1.isInstantiableClass)(filterMetaclass)) {
1118
- let isMetaclassOverlap = evaluator.assignType(metaclassType, types_1.ClassType.cloneAsInstance(filterMetaclass));
1142
+ let isMetaclassOverlap = evaluator.assignType(convertVarTypeToFree(metaclassType), types_1.ClassType.cloneAsInstance(filterMetaclass));
1119
1143
  // Handle the special case where the metaclass for the filter is type.
1120
1144
  // This will normally be treated as type[Any], which is compatible with
1121
1145
  // any metaclass, but we specifically want to treat type as the class
@@ -1165,10 +1189,7 @@ function narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanc
1165
1189
  if (isPositiveTest) {
1166
1190
  for (const filterType of filterTypes) {
1167
1191
  const concreteFilterType = evaluator.makeTopLevelTypeVarsConcrete(filterType);
1168
- if (evaluator.assignType(varType, (0, typeUtils_1.convertToInstance)(concreteFilterType),
1169
- /* diag */ undefined,
1170
- /* destTypeVarContext */ undefined,
1171
- /* srcTypeVarContext */ undefined, 1024 /* AssignTypeFlags.IgnoreTypeVarScope */)) {
1192
+ if (evaluator.assignType(convertVarTypeToFree(varType), (0, typeUtils_1.convertToInstance)(concreteFilterType))) {
1172
1193
  // If the filter type is a Callable, use the original type. If the
1173
1194
  // filter type is a callback protocol, use the filter type.
1174
1195
  if ((0, types_1.isFunction)(filterType)) {
@@ -1187,7 +1208,7 @@ function narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanc
1187
1208
  if ((0, types_1.isClass)(concreteFilterType) && !types_1.ClassType.isProtocolClass(concreteFilterType)) {
1188
1209
  return false;
1189
1210
  }
1190
- return evaluator.assignType(varType, (0, typeUtils_1.convertToInstance)(concreteFilterType));
1211
+ return evaluator.assignType(convertVarTypeToFree(varType), (0, typeUtils_1.convertToInstance)(concreteFilterType));
1191
1212
  })) {
1192
1213
  filteredTypes.push(unexpandedType);
1193
1214
  }
@@ -1249,7 +1270,7 @@ function narrowTypeForIsInstanceInternal(evaluator, type, filterTypes, isInstanc
1249
1270
  if ((0, types_1.isClassInstance)(subtype)) {
1250
1271
  return (0, types_1.combineTypes)(filterClassType(unexpandedSubtype, types_1.ClassType.cloneAsInstantiable(subtype), (0, typeUtils_1.getTypeCondition)(subtype), negativeFallback));
1251
1272
  }
1252
- if (((0, types_1.isFunction)(subtype) || (0, types_1.isOverloadedFunction)(subtype)) && isInstanceCheck) {
1273
+ if (((0, types_1.isFunction)(subtype) || (0, types_1.isOverloaded)(subtype)) && isInstanceCheck) {
1253
1274
  return (0, types_1.combineTypes)(filterFunctionType(subtype, (0, typeUtils_1.convertToInstance)(unexpandedSubtype)));
1254
1275
  }
1255
1276
  if ((0, types_1.isInstantiableClass)(subtype) || isSubtypeMetaclass) {
@@ -1338,7 +1359,7 @@ function narrowTypeForTupleLength(evaluator, referenceType, lengthValue, isPosit
1338
1359
  !concreteSubtype.priv.tupleTypeArgs) {
1339
1360
  return subtype;
1340
1361
  }
1341
- // If the tuple contains a variadic TypeVar, we can't narrow it.
1362
+ // If the tuple contains a TypeVarTuple, we can't narrow it.
1342
1363
  if (concreteSubtype.priv.tupleTypeArgs.some((typeArg) => (0, types_1.isUnpackedTypeVarTuple)(typeArg.type))) {
1343
1364
  return subtype;
1344
1365
  }
@@ -1469,7 +1490,6 @@ function getElementTypeForContainerNarrowing(containerType) {
1469
1490
  }
1470
1491
  return elementType;
1471
1492
  }
1472
- exports.getElementTypeForContainerNarrowing = getElementTypeForContainerNarrowing;
1473
1493
  function narrowTypeForContainerElementType(evaluator, referenceType, elementType) {
1474
1494
  let canNarrow = true;
1475
1495
  const elementTypeWithoutLiteral = evaluator.stripLiteralValue(elementType);
@@ -1528,7 +1548,6 @@ function narrowTypeForContainerElementType(evaluator, referenceType, elementType
1528
1548
  });
1529
1549
  return canNarrow ? (0, types_1.combineTypes)([narrowedSupertypes, narrowedSubtypes]) : referenceType;
1530
1550
  }
1531
- exports.narrowTypeForContainerElementType = narrowTypeForContainerElementType;
1532
1551
  // Attempts to narrow a type based on whether it is a TypedDict with
1533
1552
  // a literal key value.
1534
1553
  function narrowTypeForTypedDictKey(evaluator, referenceType, literalKey, isPositiveTest) {
@@ -1604,7 +1623,6 @@ function narrowTypeForDiscriminatedDictEntryComparison(evaluator, referenceType,
1604
1623
  });
1605
1624
  return canNarrow ? narrowedType : referenceType;
1606
1625
  }
1607
- exports.narrowTypeForDiscriminatedDictEntryComparison = narrowTypeForDiscriminatedDictEntryComparison;
1608
1626
  function narrowTypeForDiscriminatedTupleComparison(evaluator, referenceType, indexLiteralType, literalType, isPositiveTest) {
1609
1627
  let canNarrow = true;
1610
1628
  const narrowedType = (0, typeUtils_1.mapSubtypes)(referenceType, (subtype) => {
@@ -1632,7 +1650,6 @@ function narrowTypeForDiscriminatedTupleComparison(evaluator, referenceType, ind
1632
1650
  });
1633
1651
  return canNarrow ? narrowedType : referenceType;
1634
1652
  }
1635
- exports.narrowTypeForDiscriminatedTupleComparison = narrowTypeForDiscriminatedTupleComparison;
1636
1653
  // Attempts to narrow a type based on a comparison (equal or not equal)
1637
1654
  // between a discriminating field that has a declared literal type to a
1638
1655
  // literal value.
@@ -1672,7 +1689,6 @@ function narrowTypeForDiscriminatedLiteralFieldComparison(evaluator, referenceTy
1672
1689
  });
1673
1690
  return narrowedType;
1674
1691
  }
1675
- exports.narrowTypeForDiscriminatedLiteralFieldComparison = narrowTypeForDiscriminatedLiteralFieldComparison;
1676
1692
  // Attempts to narrow a type based on a comparison (equal or not equal)
1677
1693
  // between a discriminating field that has a declared None type to a
1678
1694
  // None.
@@ -1740,9 +1756,6 @@ function narrowTypeForTypeIs(evaluator, type, classType, isPositiveTest) {
1740
1756
  return subtype;
1741
1757
  }
1742
1758
  }
1743
- else if ((0, typeUtils_1.isNoneInstance)(subtype)) {
1744
- return isPositiveTest ? undefined : subtype;
1745
- }
1746
1759
  else if ((0, types_1.isAnyOrUnknown)(subtype)) {
1747
1760
  return isPositiveTest ? types_1.ClassType.cloneAsInstance(classType) : subtype;
1748
1761
  }
@@ -1755,9 +1768,6 @@ function narrowTypeForClassComparison(evaluator, referenceType, classType, isPos
1755
1768
  return (0, typeUtils_1.mapSubtypes)(referenceType, (subtype) => {
1756
1769
  let concreteSubtype = evaluator.makeTopLevelTypeVarsConcrete(subtype);
1757
1770
  if (isPositiveTest) {
1758
- if ((0, typeUtils_1.isNoneInstance)(concreteSubtype)) {
1759
- return (0, typeUtils_1.isNoneTypeClass)(classType) ? classType : undefined;
1760
- }
1761
1771
  if ((0, types_1.isClassInstance)(concreteSubtype) &&
1762
1772
  types_1.TypeBase.isInstance(subtype) &&
1763
1773
  types_1.ClassType.isBuiltIn(concreteSubtype, 'type')) {
@@ -1881,7 +1891,6 @@ function enumerateLiteralsForType(evaluator, type) {
1881
1891
  }
1882
1892
  return undefined;
1883
1893
  }
1884
- exports.enumerateLiteralsForType = enumerateLiteralsForType;
1885
1894
  // Attempts to narrow a type (make it more constrained) based on a
1886
1895
  // call to "callable". For example, if the original type of expression "x" is
1887
1896
  // Union[Callable[..., Any], Type[int], int], it would remove the "int" because
@@ -1891,7 +1900,7 @@ function narrowTypeForCallable(evaluator, type, isPositiveTest, errorNode, allow
1891
1900
  var _a;
1892
1901
  switch (subtype.category) {
1893
1902
  case 4 /* TypeCategory.Function */:
1894
- case 5 /* TypeCategory.OverloadedFunction */: {
1903
+ case 5 /* TypeCategory.Overloaded */: {
1895
1904
  return isPositiveTest ? subtype : undefined;
1896
1905
  }
1897
1906
  case 7 /* TypeCategory.Module */: {
@@ -1964,5 +1973,4 @@ function func1(val) {
1964
1973
  console.log(val);
1965
1974
  }
1966
1975
  }
1967
- exports.func1 = func1;
1968
1976
  //# sourceMappingURL=typeGuards.js.map