@zzzen/pyright-internal 1.1.254
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.
- package/dist/analyzer/aliasDeclarationUtils.d.ts +9 -0
- package/dist/analyzer/aliasDeclarationUtils.js +128 -0
- package/dist/analyzer/aliasDeclarationUtils.js.map +1 -0
- package/dist/analyzer/analysis.d.ts +18 -0
- package/dist/analyzer/analysis.js +81 -0
- package/dist/analyzer/analysis.js.map +1 -0
- package/dist/analyzer/analyzerFileInfo.d.ts +39 -0
- package/dist/analyzer/analyzerFileInfo.js +17 -0
- package/dist/analyzer/analyzerFileInfo.js.map +1 -0
- package/dist/analyzer/analyzerNodeInfo.d.ts +32 -0
- package/dist/analyzer/analyzerNodeInfo.js +138 -0
- package/dist/analyzer/analyzerNodeInfo.js.map +1 -0
- package/dist/analyzer/backgroundAnalysisProgram.d.ts +54 -0
- package/dist/analyzer/backgroundAnalysisProgram.js +222 -0
- package/dist/analyzer/backgroundAnalysisProgram.js.map +1 -0
- package/dist/analyzer/binder.d.ts +149 -0
- package/dist/analyzer/binder.js +3195 -0
- package/dist/analyzer/binder.js.map +1 -0
- package/dist/analyzer/checker.d.ts +116 -0
- package/dist/analyzer/checker.js +3828 -0
- package/dist/analyzer/checker.js.map +1 -0
- package/dist/analyzer/circularDependency.d.ts +7 -0
- package/dist/analyzer/circularDependency.js +51 -0
- package/dist/analyzer/circularDependency.js.map +1 -0
- package/dist/analyzer/codeFlowEngine.d.ts +21 -0
- package/dist/analyzer/codeFlowEngine.js +1132 -0
- package/dist/analyzer/codeFlowEngine.js.map +1 -0
- package/dist/analyzer/codeFlowTypes.d.ts +82 -0
- package/dist/analyzer/codeFlowTypes.js +134 -0
- package/dist/analyzer/codeFlowTypes.js.map +1 -0
- package/dist/analyzer/codeFlowUtils.d.ts +2 -0
- package/dist/analyzer/codeFlowUtils.js +348 -0
- package/dist/analyzer/codeFlowUtils.js.map +1 -0
- package/dist/analyzer/commentUtils.d.ts +4 -0
- package/dist/analyzer/commentUtils.js +131 -0
- package/dist/analyzer/commentUtils.js.map +1 -0
- package/dist/analyzer/constraintSolver.d.ts +7 -0
- package/dist/analyzer/constraintSolver.js +605 -0
- package/dist/analyzer/constraintSolver.js.map +1 -0
- package/dist/analyzer/constructorTransform.d.ts +4 -0
- package/dist/analyzer/constructorTransform.js +219 -0
- package/dist/analyzer/constructorTransform.js.map +1 -0
- package/dist/analyzer/dataClasses.d.ts +9 -0
- package/dist/analyzer/dataClasses.js +762 -0
- package/dist/analyzer/dataClasses.js.map +1 -0
- package/dist/analyzer/declaration.d.ts +90 -0
- package/dist/analyzer/declaration.js +42 -0
- package/dist/analyzer/declaration.js.map +1 -0
- package/dist/analyzer/declarationUtils.d.ts +12 -0
- package/dist/analyzer/declarationUtils.js +212 -0
- package/dist/analyzer/declarationUtils.js.map +1 -0
- package/dist/analyzer/docStringConversion.d.ts +2 -0
- package/dist/analyzer/docStringConversion.js +699 -0
- package/dist/analyzer/docStringConversion.js.map +1 -0
- package/dist/analyzer/docStringUtils.d.ts +3 -0
- package/dist/analyzer/docStringUtils.js +103 -0
- package/dist/analyzer/docStringUtils.js.map +1 -0
- package/dist/analyzer/functionTransform.d.ts +4 -0
- package/dist/analyzer/functionTransform.js +96 -0
- package/dist/analyzer/functionTransform.js.map +1 -0
- package/dist/analyzer/importResolver.d.ts +97 -0
- package/dist/analyzer/importResolver.js +1617 -0
- package/dist/analyzer/importResolver.js.map +1 -0
- package/dist/analyzer/importResult.d.ts +33 -0
- package/dist/analyzer/importResult.js +11 -0
- package/dist/analyzer/importResult.js.map +1 -0
- package/dist/analyzer/importStatementUtils.d.ts +46 -0
- package/dist/analyzer/importStatementUtils.js +618 -0
- package/dist/analyzer/importStatementUtils.js.map +1 -0
- package/dist/analyzer/namedTuples.d.ts +5 -0
- package/dist/analyzer/namedTuples.js +342 -0
- package/dist/analyzer/namedTuples.js.map +1 -0
- package/dist/analyzer/packageTypeReport.d.ts +52 -0
- package/dist/analyzer/packageTypeReport.js +45 -0
- package/dist/analyzer/packageTypeReport.js.map +1 -0
- package/dist/analyzer/packageTypeVerifier.d.ts +37 -0
- package/dist/analyzer/packageTypeVerifier.js +908 -0
- package/dist/analyzer/packageTypeVerifier.js.map +1 -0
- package/dist/analyzer/parentDirectoryCache.d.ts +23 -0
- package/dist/analyzer/parentDirectoryCache.js +71 -0
- package/dist/analyzer/parentDirectoryCache.js.map +1 -0
- package/dist/analyzer/parseTreeCleaner.d.ts +8 -0
- package/dist/analyzer/parseTreeCleaner.js +51 -0
- package/dist/analyzer/parseTreeCleaner.js.map +1 -0
- package/dist/analyzer/parseTreeUtils.d.ts +98 -0
- package/dist/analyzer/parseTreeUtils.js +1753 -0
- package/dist/analyzer/parseTreeUtils.js.map +1 -0
- package/dist/analyzer/parseTreeWalker.d.ts +81 -0
- package/dist/analyzer/parseTreeWalker.js +437 -0
- package/dist/analyzer/parseTreeWalker.js.map +1 -0
- package/dist/analyzer/patternMatching.d.ts +6 -0
- package/dist/analyzer/patternMatching.js +866 -0
- package/dist/analyzer/patternMatching.js.map +1 -0
- package/dist/analyzer/program.d.ts +158 -0
- package/dist/analyzer/program.js +1902 -0
- package/dist/analyzer/program.js.map +1 -0
- package/dist/analyzer/properties.d.ts +10 -0
- package/dist/analyzer/properties.js +368 -0
- package/dist/analyzer/properties.js.map +1 -0
- package/dist/analyzer/protocols.d.ts +8 -0
- package/dist/analyzer/protocols.js +409 -0
- package/dist/analyzer/protocols.js.map +1 -0
- package/dist/analyzer/pyTypedUtils.d.ts +6 -0
- package/dist/analyzer/pyTypedUtils.js +42 -0
- package/dist/analyzer/pyTypedUtils.js.map +1 -0
- package/dist/analyzer/pythonPathUtils.d.ts +14 -0
- package/dist/analyzer/pythonPathUtils.js +173 -0
- package/dist/analyzer/pythonPathUtils.js.map +1 -0
- package/dist/analyzer/scope.d.ts +39 -0
- package/dist/analyzer/scope.js +110 -0
- package/dist/analyzer/scope.js.map +1 -0
- package/dist/analyzer/scopeUtils.d.ts +6 -0
- package/dist/analyzer/scopeUtils.js +72 -0
- package/dist/analyzer/scopeUtils.js.map +1 -0
- package/dist/analyzer/service.d.ts +144 -0
- package/dist/analyzer/service.js +1197 -0
- package/dist/analyzer/service.js.map +1 -0
- package/dist/analyzer/sourceFile.d.ts +123 -0
- package/dist/analyzer/sourceFile.js +908 -0
- package/dist/analyzer/sourceFile.js.map +1 -0
- package/dist/analyzer/sourceMapper.d.ts +47 -0
- package/dist/analyzer/sourceMapper.js +543 -0
- package/dist/analyzer/sourceMapper.js.map +1 -0
- package/dist/analyzer/staticExpressions.d.ts +4 -0
- package/dist/analyzer/staticExpressions.js +242 -0
- package/dist/analyzer/staticExpressions.js.map +1 -0
- package/dist/analyzer/symbol.d.ts +50 -0
- package/dist/analyzer/symbol.js +160 -0
- package/dist/analyzer/symbol.js.map +1 -0
- package/dist/analyzer/symbolNameUtils.d.ts +8 -0
- package/dist/analyzer/symbolNameUtils.js +53 -0
- package/dist/analyzer/symbolNameUtils.js.map +1 -0
- package/dist/analyzer/symbolUtils.d.ts +7 -0
- package/dist/analyzer/symbolUtils.js +46 -0
- package/dist/analyzer/symbolUtils.js.map +1 -0
- package/dist/analyzer/testWalker.d.ts +14 -0
- package/dist/analyzer/testWalker.js +92 -0
- package/dist/analyzer/testWalker.js.map +1 -0
- package/dist/analyzer/tracePrinter.d.ts +11 -0
- package/dist/analyzer/tracePrinter.js +222 -0
- package/dist/analyzer/tracePrinter.js.map +1 -0
- package/dist/analyzer/typeCache.d.ts +40 -0
- package/dist/analyzer/typeCache.js +134 -0
- package/dist/analyzer/typeCache.js.map +1 -0
- package/dist/analyzer/typeDocStringUtils.d.ts +12 -0
- package/dist/analyzer/typeDocStringUtils.js +293 -0
- package/dist/analyzer/typeDocStringUtils.js.map +1 -0
- package/dist/analyzer/typeEvaluator.d.ts +18 -0
- package/dist/analyzer/typeEvaluator.js +16598 -0
- package/dist/analyzer/typeEvaluator.js.map +1 -0
- package/dist/analyzer/typeEvaluatorTypes.d.ts +220 -0
- package/dist/analyzer/typeEvaluatorTypes.js +16 -0
- package/dist/analyzer/typeEvaluatorTypes.js.map +1 -0
- package/dist/analyzer/typeEvaluatorWithTracker.d.ts +6 -0
- package/dist/analyzer/typeEvaluatorWithTracker.js +121 -0
- package/dist/analyzer/typeEvaluatorWithTracker.js.map +1 -0
- package/dist/analyzer/typeGuards.d.ts +6 -0
- package/dist/analyzer/typeGuards.js +1293 -0
- package/dist/analyzer/typeGuards.js.map +1 -0
- package/dist/analyzer/typePrinter.d.ts +17 -0
- package/dist/analyzer/typePrinter.js +603 -0
- package/dist/analyzer/typePrinter.js.map +1 -0
- package/dist/analyzer/typeStubWriter.d.ts +48 -0
- package/dist/analyzer/typeStubWriter.js +605 -0
- package/dist/analyzer/typeStubWriter.js.map +1 -0
- package/dist/analyzer/typeUtils.d.ts +134 -0
- package/dist/analyzer/typeUtils.js +2380 -0
- package/dist/analyzer/typeUtils.js.map +1 -0
- package/dist/analyzer/typeVarContext.d.ts +50 -0
- package/dist/analyzer/typeVarContext.js +250 -0
- package/dist/analyzer/typeVarContext.js.map +1 -0
- package/dist/analyzer/typedDicts.d.ts +12 -0
- package/dist/analyzer/typedDicts.js +695 -0
- package/dist/analyzer/typedDicts.js.map +1 -0
- package/dist/analyzer/types.d.ts +484 -0
- package/dist/analyzer/types.js +1844 -0
- package/dist/analyzer/types.js.map +1 -0
- package/dist/backgroundAnalysis.d.ts +14 -0
- package/dist/backgroundAnalysis.js +42 -0
- package/dist/backgroundAnalysis.js.map +1 -0
- package/dist/backgroundAnalysisBase.d.ts +83 -0
- package/dist/backgroundAnalysisBase.js +429 -0
- package/dist/backgroundAnalysisBase.js.map +1 -0
- package/dist/backgroundThreadBase.d.ts +34 -0
- package/dist/backgroundThreadBase.js +134 -0
- package/dist/backgroundThreadBase.js.map +1 -0
- package/dist/commands/commandController.d.ts +13 -0
- package/dist/commands/commandController.js +48 -0
- package/dist/commands/commandController.js.map +1 -0
- package/dist/commands/commandResult.d.ts +9 -0
- package/dist/commands/commandResult.js +19 -0
- package/dist/commands/commandResult.js.map +1 -0
- package/dist/commands/commands.d.ts +7 -0
- package/dist/commands/commands.js +11 -0
- package/dist/commands/commands.js.map +1 -0
- package/dist/commands/createTypeStub.d.ts +8 -0
- package/dist/commands/createTypeStub.js +50 -0
- package/dist/commands/createTypeStub.js.map +1 -0
- package/dist/commands/quickActionCommand.d.ts +8 -0
- package/dist/commands/quickActionCommand.js +31 -0
- package/dist/commands/quickActionCommand.js.map +1 -0
- package/dist/commands/restartServer.d.ts +8 -0
- package/dist/commands/restartServer.js +20 -0
- package/dist/commands/restartServer.js.map +1 -0
- package/dist/common/cancellationUtils.d.ts +16 -0
- package/dist/common/cancellationUtils.js +60 -0
- package/dist/common/cancellationUtils.js.map +1 -0
- package/dist/common/chokidarFileWatcherProvider.d.ts +9 -0
- package/dist/common/chokidarFileWatcherProvider.js +88 -0
- package/dist/common/chokidarFileWatcherProvider.js.map +1 -0
- package/dist/common/collectionUtils.d.ts +114 -0
- package/dist/common/collectionUtils.js +292 -0
- package/dist/common/collectionUtils.js.map +1 -0
- package/dist/common/commandLineOptions.d.ts +41 -0
- package/dist/common/commandLineOptions.js +46 -0
- package/dist/common/commandLineOptions.js.map +1 -0
- package/dist/common/configOptions.d.ts +144 -0
- package/dist/common/configOptions.js +908 -0
- package/dist/common/configOptions.js.map +1 -0
- package/dist/common/console.d.ts +61 -0
- package/dist/common/console.js +191 -0
- package/dist/common/console.js.map +1 -0
- package/dist/common/core.d.ts +67 -0
- package/dist/common/core.js +118 -0
- package/dist/common/core.js.map +1 -0
- package/dist/common/crypto.d.ts +1 -0
- package/dist/common/crypto.js +37 -0
- package/dist/common/crypto.js.map +1 -0
- package/dist/common/debug.d.ts +13 -0
- package/dist/common/debug.js +131 -0
- package/dist/common/debug.js.map +1 -0
- package/dist/common/deferred.d.ts +11 -0
- package/dist/common/deferred.js +62 -0
- package/dist/common/deferred.js.map +1 -0
- package/dist/common/diagnostic.d.ts +59 -0
- package/dist/common/diagnostic.js +134 -0
- package/dist/common/diagnostic.js.map +1 -0
- package/dist/common/diagnosticRules.d.ts +67 -0
- package/dist/common/diagnosticRules.js +83 -0
- package/dist/common/diagnosticRules.js.map +1 -0
- package/dist/common/diagnosticSink.d.ts +34 -0
- package/dist/common/diagnosticSink.js +110 -0
- package/dist/common/diagnosticSink.js.map +1 -0
- package/dist/common/editAction.d.ts +29 -0
- package/dist/common/editAction.js +11 -0
- package/dist/common/editAction.js.map +1 -0
- package/dist/common/extensibility.d.ts +11 -0
- package/dist/common/extensibility.js +10 -0
- package/dist/common/extensibility.js.map +1 -0
- package/dist/common/extensions.d.ts +3 -0
- package/dist/common/extensions.js +15 -0
- package/dist/common/extensions.js.map +1 -0
- package/dist/common/fileBasedCancellationUtils.d.ts +11 -0
- package/dist/common/fileBasedCancellationUtils.js +259 -0
- package/dist/common/fileBasedCancellationUtils.js.map +1 -0
- package/dist/common/fileSystem.d.ts +72 -0
- package/dist/common/fileSystem.js +69 -0
- package/dist/common/fileSystem.js.map +1 -0
- package/dist/common/fullAccessHost.d.ts +19 -0
- package/dist/common/fullAccessHost.js +193 -0
- package/dist/common/fullAccessHost.js.map +1 -0
- package/dist/common/host.d.ts +21 -0
- package/dist/common/host.js +30 -0
- package/dist/common/host.js.map +1 -0
- package/dist/common/logTracker.d.ts +15 -0
- package/dist/common/logTracker.js +129 -0
- package/dist/common/logTracker.js.map +1 -0
- package/dist/common/lspUtils.d.ts +3 -0
- package/dist/common/lspUtils.js +20 -0
- package/dist/common/lspUtils.js.map +1 -0
- package/dist/common/memUtils.d.ts +3 -0
- package/dist/common/memUtils.js +37 -0
- package/dist/common/memUtils.js.map +1 -0
- package/dist/common/pathConsts.d.ts +8 -0
- package/dist/common/pathConsts.js +19 -0
- package/dist/common/pathConsts.js.map +1 -0
- package/dist/common/pathUtils.d.ts +170 -0
- package/dist/common/pathUtils.js +762 -0
- package/dist/common/pathUtils.js.map +1 -0
- package/dist/common/positionUtils.d.ts +7 -0
- package/dist/common/positionUtils.js +71 -0
- package/dist/common/positionUtils.js.map +1 -0
- package/dist/common/progressReporter.d.ts +15 -0
- package/dist/common/progressReporter.js +44 -0
- package/dist/common/progressReporter.js.map +1 -0
- package/dist/common/pythonVersion.d.ts +20 -0
- package/dist/common/pythonVersion.js +71 -0
- package/dist/common/pythonVersion.js.map +1 -0
- package/dist/common/realFileSystem.d.ts +8 -0
- package/dist/common/realFileSystem.js +368 -0
- package/dist/common/realFileSystem.js.map +1 -0
- package/dist/common/stringUtils.d.ts +47 -0
- package/dist/common/stringUtils.js +160 -0
- package/dist/common/stringUtils.js.map +1 -0
- package/dist/common/textEditUtils.d.ts +3 -0
- package/dist/common/textEditUtils.js +29 -0
- package/dist/common/textEditUtils.js.map +1 -0
- package/dist/common/textRange.d.ts +47 -0
- package/dist/common/textRange.js +211 -0
- package/dist/common/textRange.js.map +1 -0
- package/dist/common/textRangeCollection.d.ts +13 -0
- package/dist/common/textRangeCollection.js +108 -0
- package/dist/common/textRangeCollection.js.map +1 -0
- package/dist/common/timing.d.ts +31 -0
- package/dist/common/timing.js +100 -0
- package/dist/common/timing.js.map +1 -0
- package/dist/common/uriParser.d.ts +12 -0
- package/dist/common/uriParser.js +25 -0
- package/dist/common/uriParser.js.map +1 -0
- package/dist/common/workspaceEditUtils.d.ts +7 -0
- package/dist/common/workspaceEditUtils.js +63 -0
- package/dist/common/workspaceEditUtils.js.map +1 -0
- package/dist/languageServerBase.d.ts +211 -0
- package/dist/languageServerBase.js +923 -0
- package/dist/languageServerBase.js.map +1 -0
- package/dist/languageService/analyzerServiceExecutor.d.ts +8 -0
- package/dist/languageService/analyzerServiceExecutor.js +97 -0
- package/dist/languageService/analyzerServiceExecutor.js.map +1 -0
- package/dist/languageService/autoImporter.d.ts +84 -0
- package/dist/languageService/autoImporter.js +635 -0
- package/dist/languageService/autoImporter.js.map +1 -0
- package/dist/languageService/callHierarchyProvider.d.ts +12 -0
- package/dist/languageService/callHierarchyProvider.js +368 -0
- package/dist/languageService/callHierarchyProvider.js.map +1 -0
- package/dist/languageService/codeActionProvider.d.ts +6 -0
- package/dist/languageService/codeActionProvider.js +53 -0
- package/dist/languageService/codeActionProvider.js.map +1 -0
- package/dist/languageService/completionProvider.d.ts +147 -0
- package/dist/languageService/completionProvider.js +2220 -0
- package/dist/languageService/completionProvider.js.map +1 -0
- package/dist/languageService/definitionProvider.d.ts +17 -0
- package/dist/languageService/definitionProvider.js +206 -0
- package/dist/languageService/definitionProvider.js.map +1 -0
- package/dist/languageService/documentHighlightProvider.d.ts +7 -0
- package/dist/languageService/documentHighlightProvider.js +63 -0
- package/dist/languageService/documentHighlightProvider.js.map +1 -0
- package/dist/languageService/documentSymbolCollector.d.ts +37 -0
- package/dist/languageService/documentSymbolCollector.js +344 -0
- package/dist/languageService/documentSymbolCollector.js.map +1 -0
- package/dist/languageService/documentSymbolProvider.d.ts +37 -0
- package/dist/languageService/documentSymbolProvider.js +308 -0
- package/dist/languageService/documentSymbolProvider.js.map +1 -0
- package/dist/languageService/hoverProvider.d.ts +25 -0
- package/dist/languageService/hoverProvider.js +366 -0
- package/dist/languageService/hoverProvider.js.map +1 -0
- package/dist/languageService/importAdder.d.ts +24 -0
- package/dist/languageService/importAdder.js +296 -0
- package/dist/languageService/importAdder.js.map +1 -0
- package/dist/languageService/importSorter.d.ts +15 -0
- package/dist/languageService/importSorter.js +152 -0
- package/dist/languageService/importSorter.js.map +1 -0
- package/dist/languageService/indentationUtils.d.ts +4 -0
- package/dist/languageService/indentationUtils.js +597 -0
- package/dist/languageService/indentationUtils.js.map +1 -0
- package/dist/languageService/quickActions.d.ts +4 -0
- package/dist/languageService/quickActions.js +97 -0
- package/dist/languageService/quickActions.js.map +1 -0
- package/dist/languageService/referencesProvider.d.ts +36 -0
- package/dist/languageService/referencesProvider.js +236 -0
- package/dist/languageService/referencesProvider.js.map +1 -0
- package/dist/languageService/renameModuleProvider.d.ts +58 -0
- package/dist/languageService/renameModuleProvider.js +884 -0
- package/dist/languageService/renameModuleProvider.js.map +1 -0
- package/dist/languageService/signatureHelpProvider.d.ts +26 -0
- package/dist/languageService/signatureHelpProvider.js +180 -0
- package/dist/languageService/signatureHelpProvider.js.map +1 -0
- package/dist/languageService/tooltipUtils.d.ts +9 -0
- package/dist/languageService/tooltipUtils.js +129 -0
- package/dist/languageService/tooltipUtils.js.map +1 -0
- package/dist/localization/localize.d.ts +1324 -0
- package/dist/localization/localize.js +788 -0
- package/dist/localization/localize.js.map +1 -0
- package/dist/localization/package.nls.de.json +1 -0
- package/dist/localization/package.nls.en-us.json +636 -0
- package/dist/localization/package.nls.es.json +1 -0
- package/dist/localization/package.nls.fr.json +1 -0
- package/dist/localization/package.nls.ja.json +1 -0
- package/dist/localization/package.nls.ru.json +1 -0
- package/dist/localization/package.nls.zh-cn.json +1 -0
- package/dist/localization/package.nls.zh-tw.json +1 -0
- package/dist/nodeMain.d.ts +1 -0
- package/dist/nodeMain.js +21 -0
- package/dist/nodeMain.js.map +1 -0
- package/dist/nodeServer.d.ts +3 -0
- package/dist/nodeServer.js +31 -0
- package/dist/nodeServer.js.map +1 -0
- package/dist/parser/characterStream.d.ts +27 -0
- package/dist/parser/characterStream.js +120 -0
- package/dist/parser/characterStream.js.map +1 -0
- package/dist/parser/characters.d.ts +17 -0
- package/dist/parser/characters.js +240 -0
- package/dist/parser/characters.js.map +1 -0
- package/dist/parser/parseNodes.d.ts +750 -0
- package/dist/parser/parseNodes.js +1406 -0
- package/dist/parser/parseNodes.js.map +1 -0
- package/dist/parser/parser.d.ts +191 -0
- package/dist/parser/parser.js +3806 -0
- package/dist/parser/parser.js.map +1 -0
- package/dist/parser/stringTokenUtils.d.ts +25 -0
- package/dist/parser/stringTokenUtils.js +455 -0
- package/dist/parser/stringTokenUtils.js.map +1 -0
- package/dist/parser/tokenizer.d.ts +71 -0
- package/dist/parser/tokenizer.js +1111 -0
- package/dist/parser/tokenizer.js.map +1 -0
- package/dist/parser/tokenizerTypes.d.ts +223 -0
- package/dist/parser/tokenizerTypes.js +164 -0
- package/dist/parser/tokenizerTypes.js.map +1 -0
- package/dist/parser/unicode.d.ts +23 -0
- package/dist/parser/unicode.js +2899 -0
- package/dist/parser/unicode.js.map +1 -0
- package/dist/pyright.d.ts +1 -0
- package/dist/pyright.js +645 -0
- package/dist/pyright.js.map +1 -0
- package/dist/pyrightFileSystem.d.ts +28 -0
- package/dist/pyrightFileSystem.js +196 -0
- package/dist/pyrightFileSystem.js.map +1 -0
- package/dist/readonlyAugmentedFileSystem.d.ts +40 -0
- package/dist/readonlyAugmentedFileSystem.js +155 -0
- package/dist/readonlyAugmentedFileSystem.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +232 -0
- package/dist/server.js.map +1 -0
- package/dist/tests/chainedSourceFiles.test.d.ts +1 -0
- package/dist/tests/chainedSourceFiles.test.js +153 -0
- package/dist/tests/chainedSourceFiles.test.js.map +1 -0
- package/dist/tests/checker.test.d.ts +1 -0
- package/dist/tests/checker.test.js +346 -0
- package/dist/tests/checker.test.js.map +1 -0
- package/dist/tests/collectionUtils.test.d.ts +1 -0
- package/dist/tests/collectionUtils.test.js +153 -0
- package/dist/tests/collectionUtils.test.js.map +1 -0
- package/dist/tests/common.test.d.ts +1 -0
- package/dist/tests/common.test.js +125 -0
- package/dist/tests/common.test.js.map +1 -0
- package/dist/tests/config.test.d.ts +1 -0
- package/dist/tests/config.test.js +230 -0
- package/dist/tests/config.test.js.map +1 -0
- package/dist/tests/debug.test.d.ts +1 -0
- package/dist/tests/debug.test.js +102 -0
- package/dist/tests/debug.test.js.map +1 -0
- package/dist/tests/deferred.test.d.ts +1 -0
- package/dist/tests/deferred.test.js +65 -0
- package/dist/tests/deferred.test.js.map +1 -0
- package/dist/tests/diagnosticOverrides.test.d.ts +1 -0
- package/dist/tests/diagnosticOverrides.test.js +108 -0
- package/dist/tests/diagnosticOverrides.test.js.map +1 -0
- package/dist/tests/docStringConversion.test.d.ts +1 -0
- package/dist/tests/docStringConversion.test.js +695 -0
- package/dist/tests/docStringConversion.test.js.map +1 -0
- package/dist/tests/docStringUtils.test.d.ts +1 -0
- package/dist/tests/docStringUtils.test.js +70 -0
- package/dist/tests/docStringUtils.test.js.map +1 -0
- package/dist/tests/documentSymbolCollector.test.d.ts +1 -0
- package/dist/tests/documentSymbolCollector.test.js +635 -0
- package/dist/tests/documentSymbolCollector.test.js.map +1 -0
- package/dist/tests/filesystem.test.d.ts +1 -0
- package/dist/tests/filesystem.test.js +194 -0
- package/dist/tests/filesystem.test.js.map +1 -0
- package/dist/tests/fourSlashParser.test.d.ts +1 -0
- package/dist/tests/fourSlashParser.test.js +281 -0
- package/dist/tests/fourSlashParser.test.js.map +1 -0
- package/dist/tests/fourSlashRunner.test.d.ts +1 -0
- package/dist/tests/fourSlashRunner.test.js +52 -0
- package/dist/tests/fourSlashRunner.test.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js +42 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js +13 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js +23 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js +35 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js +128 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js +43 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js +116 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.js +21 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js +54 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.js +245 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js +162 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js +132 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.js +37 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.comment.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.comment.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.comment.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.js +18 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.js +26 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js +15 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js +36 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.js +147 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js +131 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js +73 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js +58 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js +154 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js +143 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js +109 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.js +44 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.js +12 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fourslash.js +51 -0
- package/dist/tests/fourslash/completions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.js +32 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js +96 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.d.ts +0 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inList.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inList.fourslash.js +32 -0
- package/dist/tests/fourslash/completions.inList.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.included.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.included.fourslash.js +12 -0
- package/dist/tests/fourslash/completions.included.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js +54 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js +26 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js +49 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js +101 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js +105 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js +67 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js +75 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.literals.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.literals.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.literals.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.js +71 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js +17 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js +57 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.js +37 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.importStub.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.importStub.js +49 -0
- package/dist/tests/fourslash/completions.override.default.importStub.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.js +60 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js +63 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override2.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.override2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.params.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.params.fourslash.js +23 -0
- package/dist/tests/fourslash/completions.params.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.js +15 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.js +34 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.private.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.private.fourslash.js +61 -0
- package/dist/tests/fourslash/completions.private.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.property.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.property.fourslash.js +28 -0
- package/dist/tests/fourslash/completions.property.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js +64 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.self.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.self.fourslash.js +43 -0
- package/dist/tests/fourslash/completions.self.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js +71 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.js +78 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.js +9 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.js +33 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.js +109 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.with.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.with.fourslash.js +25 -0
- package/dist/tests/fourslash/completions.with.fourslash.js.map +1 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js +64 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js +24 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.js +93 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js +19 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.js +123 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.js +79 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.js +154 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.js +42 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js +34 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js +213 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js +154 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js +29 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js +30 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js +26 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js +28 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js +33 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js +26 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js +59 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js +59 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js +94 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.js +79 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js +106 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js +24 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js +66 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js +26 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js +36 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.fourslash.js +30 -0
- package/dist/tests/fourslash/findallreferences.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.js +30 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js +46 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js +60 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js +54 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.js +41 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js +83 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js +32 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.js +22 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js +29 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js +33 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js +36 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js +44 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js +31 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.js +22 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.js.map +1 -0
- package/dist/tests/fourslash/fourslash.d.ts +301 -0
- package/dist/tests/fourslash/fourslash.js +25 -0
- package/dist/tests/fourslash/fourslash.js.map +1 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js +30 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js +63 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.js +14 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.js +47 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.js +77 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js +22 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js +22 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js +21 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js +25 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js +18 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.js +12 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.js +24 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.js +23 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.import.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.import.fourslash.js +10 -0
- package/dist/tests/fourslash/hover.import.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js +61 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js +51 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js +40 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js +43 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js +44 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js +84 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js +88 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.init.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.init.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.init.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js +49 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js +39 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.js +39 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js +14 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.js +50 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.js +35 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.js +73 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.js +63 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js +72 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js +61 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js +35 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js +35 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.js +24 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.js.map +1 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.js +13 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js +18 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.js +13 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js +31 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js +44 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js +35 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js +35 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.js +18 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js +34 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js.map +1 -0
- package/dist/tests/fourslash/noerrors.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/noerrors.fourslash.js +9 -0
- package/dist/tests/fourslash/noerrors.fourslash.js.map +1 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.js +17 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.js.map +1 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.js +21 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.js +23 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js +23 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.fourslash.js +26 -0
- package/dist/tests/fourslash/rename.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.library.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.library.fourslash.js +26 -0
- package/dist/tests/fourslash/rename.library.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js +29 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.d.ts +2 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.js +19 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js +33 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.js +39 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.string.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.string.fourslash.js +25 -0
- package/dist/tests/fourslash/rename.string.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js +62 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.js +97 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.js +22 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.js +42 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js +49 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js +115 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.overload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.overload.fourslash.js +63 -0
- package/dist/tests/fourslash/signature.overload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.simple.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.simple.fourslash.js +104 -0
- package/dist/tests/fourslash/signature.simple.fourslash.js.map +1 -0
- package/dist/tests/harness/fourslash/fourSlashParser.d.ts +10 -0
- package/dist/tests/harness/fourslash/fourSlashParser.js +347 -0
- package/dist/tests/harness/fourslash/fourSlashParser.js.map +1 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.d.ts +81 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.js +65 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.js.map +1 -0
- package/dist/tests/harness/fourslash/runner.d.ts +20 -0
- package/dist/tests/harness/fourslash/runner.js +93 -0
- package/dist/tests/harness/fourslash/runner.js.map +1 -0
- package/dist/tests/harness/fourslash/testLanguageService.d.ts +40 -0
- package/dist/tests/harness/fourslash/testLanguageService.js +120 -0
- package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -0
- package/dist/tests/harness/fourslash/testState.Consts.d.ts +11 -0
- package/dist/tests/harness/fourslash/testState.Consts.js +50 -0
- package/dist/tests/harness/fourslash/testState.Consts.js.map +1 -0
- package/dist/tests/harness/fourslash/testState.d.ts +232 -0
- package/dist/tests/harness/fourslash/testState.js +1381 -0
- package/dist/tests/harness/fourslash/testState.js.map +1 -0
- package/dist/tests/harness/testAccessHost.d.ts +8 -0
- package/dist/tests/harness/testAccessHost.js +26 -0
- package/dist/tests/harness/testAccessHost.js.map +1 -0
- package/dist/tests/harness/testHost.d.ts +16 -0
- package/dist/tests/harness/testHost.js +161 -0
- package/dist/tests/harness/testHost.js.map +1 -0
- package/dist/tests/harness/utils.d.ts +74 -0
- package/dist/tests/harness/utils.js +328 -0
- package/dist/tests/harness/utils.js.map +1 -0
- package/dist/tests/harness/vfs/factory.d.ts +32 -0
- package/dist/tests/harness/vfs/factory.js +173 -0
- package/dist/tests/harness/vfs/factory.js.map +1 -0
- package/dist/tests/harness/vfs/filesystem.d.ts +430 -0
- package/dist/tests/harness/vfs/filesystem.js +1455 -0
- package/dist/tests/harness/vfs/filesystem.js.map +1 -0
- package/dist/tests/harness/vfs/pathValidation.d.ts +24 -0
- package/dist/tests/harness/vfs/pathValidation.js +123 -0
- package/dist/tests/harness/vfs/pathValidation.js.map +1 -0
- package/dist/tests/importAdder.test.d.ts +1 -0
- package/dist/tests/importAdder.test.js +1192 -0
- package/dist/tests/importAdder.test.js.map +1 -0
- package/dist/tests/importResolver.test.d.ts +1 -0
- package/dist/tests/importResolver.test.js +450 -0
- package/dist/tests/importResolver.test.js.map +1 -0
- package/dist/tests/importStatementUtils.test.d.ts +1 -0
- package/dist/tests/importStatementUtils.test.js +371 -0
- package/dist/tests/importStatementUtils.test.js.map +1 -0
- package/dist/tests/indentationUtils.ptvs.test.d.ts +1 -0
- package/dist/tests/indentationUtils.ptvs.test.js +324 -0
- package/dist/tests/indentationUtils.ptvs.test.js.map +1 -0
- package/dist/tests/indentationUtils.reindent.test.d.ts +1 -0
- package/dist/tests/indentationUtils.reindent.test.js +332 -0
- package/dist/tests/indentationUtils.reindent.test.js.map +1 -0
- package/dist/tests/indentationUtils.test.d.ts +1 -0
- package/dist/tests/indentationUtils.test.js +375 -0
- package/dist/tests/indentationUtils.test.js.map +1 -0
- package/dist/tests/ipythonMode.test.d.ts +1 -0
- package/dist/tests/ipythonMode.test.js +303 -0
- package/dist/tests/ipythonMode.test.js.map +1 -0
- package/dist/tests/localizer.test.d.ts +1 -0
- package/dist/tests/localizer.test.js +64 -0
- package/dist/tests/localizer.test.js.map +1 -0
- package/dist/tests/parseTreeUtils.test.d.ts +1 -0
- package/dist/tests/parseTreeUtils.test.js +228 -0
- package/dist/tests/parseTreeUtils.test.js.map +1 -0
- package/dist/tests/parser.test.d.ts +1 -0
- package/dist/tests/parser.test.js +101 -0
- package/dist/tests/parser.test.js.map +1 -0
- package/dist/tests/pathUtils.test.d.ts +1 -0
- package/dist/tests/pathUtils.test.js +253 -0
- package/dist/tests/pathUtils.test.js.map +1 -0
- package/dist/tests/pyrightFileSystem.test.d.ts +1 -0
- package/dist/tests/pyrightFileSystem.test.js +152 -0
- package/dist/tests/pyrightFileSystem.test.js.map +1 -0
- package/dist/tests/renameModule.folder.test.d.ts +1 -0
- package/dist/tests/renameModule.folder.test.js +229 -0
- package/dist/tests/renameModule.folder.test.js.map +1 -0
- package/dist/tests/renameModule.fromImports.test.d.ts +1 -0
- package/dist/tests/renameModule.fromImports.test.js +790 -0
- package/dist/tests/renameModule.fromImports.test.js.map +1 -0
- package/dist/tests/renameModule.imports.test.d.ts +1 -0
- package/dist/tests/renameModule.imports.test.js +380 -0
- package/dist/tests/renameModule.imports.test.js.map +1 -0
- package/dist/tests/renameModule.misc.test.d.ts +1 -0
- package/dist/tests/renameModule.misc.test.js +615 -0
- package/dist/tests/renameModule.misc.test.js.map +1 -0
- package/dist/tests/renameModule.relativePath.test.d.ts +1 -0
- package/dist/tests/renameModule.relativePath.test.js +231 -0
- package/dist/tests/renameModule.relativePath.test.js.map +1 -0
- package/dist/tests/renameModuleTestUtils.d.ts +4 -0
- package/dist/tests/renameModuleTestUtils.js +148 -0
- package/dist/tests/renameModuleTestUtils.js.map +1 -0
- package/dist/tests/sourceFile.test.d.ts +1 -0
- package/dist/tests/sourceFile.test.js +25 -0
- package/dist/tests/sourceFile.test.js.map +1 -0
- package/dist/tests/stringUtils.test.d.ts +1 -0
- package/dist/tests/stringUtils.test.js +69 -0
- package/dist/tests/stringUtils.test.js.map +1 -0
- package/dist/tests/symbolNameUtils.test.d.ts +1 -0
- package/dist/tests/symbolNameUtils.test.js +83 -0
- package/dist/tests/symbolNameUtils.test.js.map +1 -0
- package/dist/tests/testState.test.d.ts +1 -0
- package/dist/tests/testState.test.js +521 -0
- package/dist/tests/testState.test.js.map +1 -0
- package/dist/tests/testUtils.d.ts +27 -0
- package/dist/tests/testUtils.js +213 -0
- package/dist/tests/testUtils.js.map +1 -0
- package/dist/tests/tokenizer.test.d.ts +1 -0
- package/dist/tests/tokenizer.test.js +1277 -0
- package/dist/tests/tokenizer.test.js.map +1 -0
- package/dist/tests/typeEvaluator1.test.d.ts +1 -0
- package/dist/tests/typeEvaluator1.test.js +1023 -0
- package/dist/tests/typeEvaluator1.test.js.map +1 -0
- package/dist/tests/typeEvaluator2.test.d.ts +1 -0
- package/dist/tests/typeEvaluator2.test.js +869 -0
- package/dist/tests/typeEvaluator2.test.js.map +1 -0
- package/dist/tests/typeEvaluator3.test.d.ts +1 -0
- package/dist/tests/typeEvaluator3.test.js +915 -0
- package/dist/tests/typeEvaluator3.test.js.map +1 -0
- package/dist/tests/typeEvaluator4.test.d.ts +1 -0
- package/dist/tests/typeEvaluator4.test.js +901 -0
- package/dist/tests/typeEvaluator4.test.js.map +1 -0
- package/dist/tests/updateSymbolReference.test.d.ts +1 -0
- package/dist/tests/updateSymbolReference.test.js +980 -0
- package/dist/tests/updateSymbolReference.test.js.map +1 -0
- package/dist/tests/zipfs.test.d.ts +1 -0
- package/dist/tests/zipfs.test.js +112 -0
- package/dist/tests/zipfs.test.js.map +1 -0
- package/dist/workspaceMap.d.ts +6 -0
- package/dist/workspaceMap.js +73 -0
- package/dist/workspaceMap.js.map +1 -0
- package/package.json +45 -0
@@ -0,0 +1,695 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* typedDicts.ts
|
4
|
+
* Copyright (c) Microsoft Corporation.
|
5
|
+
* Licensed under the MIT license.
|
6
|
+
* Author: Eric Traut
|
7
|
+
*
|
8
|
+
* Provides special-case logic for the construction of TypedDict
|
9
|
+
* classes.
|
10
|
+
*/
|
11
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
12
|
+
if (k2 === undefined) k2 = k;
|
13
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
14
|
+
}) : (function(o, m, k, k2) {
|
15
|
+
if (k2 === undefined) k2 = k;
|
16
|
+
o[k2] = m[k];
|
17
|
+
}));
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
20
|
+
}) : function(o, v) {
|
21
|
+
o["default"] = v;
|
22
|
+
});
|
23
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
24
|
+
if (mod && mod.__esModule) return mod;
|
25
|
+
var result = {};
|
26
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
27
|
+
__setModuleDefault(result, mod);
|
28
|
+
return result;
|
29
|
+
};
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
31
|
+
exports.getTypeOfIndexedTypedDict = exports.assignToTypedDict = exports.assignTypedDictToTypedDict = exports.getTypedDictMembersForClass = exports.synthesizeTypedDictClassMethods = exports.createTypedDictType = void 0;
|
32
|
+
const collectionUtils_1 = require("../common/collectionUtils");
|
33
|
+
const debug_1 = require("../common/debug");
|
34
|
+
const diagnostic_1 = require("../common/diagnostic");
|
35
|
+
const diagnosticRules_1 = require("../common/diagnosticRules");
|
36
|
+
const positionUtils_1 = require("../common/positionUtils");
|
37
|
+
const textRange_1 = require("../common/textRange");
|
38
|
+
const localize_1 = require("../localization/localize");
|
39
|
+
const AnalyzerNodeInfo = __importStar(require("./analyzerNodeInfo"));
|
40
|
+
const ParseTreeUtils = __importStar(require("./parseTreeUtils"));
|
41
|
+
const symbol_1 = require("./symbol");
|
42
|
+
const symbolUtils_1 = require("./symbolUtils");
|
43
|
+
const types_1 = require("./types");
|
44
|
+
const typeUtils_1 = require("./typeUtils");
|
45
|
+
const typeVarContext_1 = require("./typeVarContext");
|
46
|
+
// Creates a new custom TypedDict factory class.
|
47
|
+
function createTypedDictType(evaluator, errorNode, typedDictClass, argList) {
|
48
|
+
const fileInfo = AnalyzerNodeInfo.getFileInfo(errorNode);
|
49
|
+
// TypedDict supports two different syntaxes:
|
50
|
+
// Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})
|
51
|
+
// Point2D = TypedDict('Point2D', x=int, y=int, label=str)
|
52
|
+
let className = 'TypedDict';
|
53
|
+
if (argList.length === 0) {
|
54
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictFirstArg(), errorNode);
|
55
|
+
}
|
56
|
+
else {
|
57
|
+
const nameArg = argList[0];
|
58
|
+
if (nameArg.argumentCategory !== 0 /* Simple */ ||
|
59
|
+
!nameArg.valueExpression ||
|
60
|
+
nameArg.valueExpression.nodeType !== 48 /* StringList */) {
|
61
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictFirstArg(), argList[0].valueExpression || errorNode);
|
62
|
+
}
|
63
|
+
else {
|
64
|
+
className = nameArg.valueExpression.strings.map((s) => s.value).join('');
|
65
|
+
}
|
66
|
+
}
|
67
|
+
const classType = types_1.ClassType.createInstantiable(className, ParseTreeUtils.getClassFullName(errorNode, fileInfo.moduleName, className), fileInfo.moduleName, fileInfo.filePath, 128 /* TypedDictClass */, ParseTreeUtils.getTypeSourceId(errorNode),
|
68
|
+
/* declaredMetaclass */ undefined, typedDictClass.details.effectiveMetaclass);
|
69
|
+
classType.details.baseClasses.push(typedDictClass);
|
70
|
+
(0, typeUtils_1.computeMroLinearization)(classType);
|
71
|
+
const classFields = classType.details.fields;
|
72
|
+
classFields.set('__class__', symbol_1.Symbol.createWithType(4 /* ClassMember */ | 64 /* IgnoredForProtocolMatch */, classType));
|
73
|
+
let usingDictSyntax = false;
|
74
|
+
if (argList.length < 2) {
|
75
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictSecondArgDict(), errorNode);
|
76
|
+
}
|
77
|
+
else {
|
78
|
+
const entriesArg = argList[1];
|
79
|
+
const entryMap = new Map();
|
80
|
+
if (entriesArg.argumentCategory === 0 /* Simple */ &&
|
81
|
+
entriesArg.valueExpression &&
|
82
|
+
entriesArg.valueExpression.nodeType === 15 /* Dictionary */) {
|
83
|
+
usingDictSyntax = true;
|
84
|
+
const entryDict = entriesArg.valueExpression;
|
85
|
+
entryDict.entries.forEach((entry) => {
|
86
|
+
if (entry.nodeType !== 17 /* DictionaryKeyEntry */) {
|
87
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictSecondArgDictEntry(), entry);
|
88
|
+
return;
|
89
|
+
}
|
90
|
+
if (entry.keyExpression.nodeType !== 48 /* StringList */) {
|
91
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictEntryName(), entry.keyExpression);
|
92
|
+
return;
|
93
|
+
}
|
94
|
+
const entryName = entry.keyExpression.strings.map((s) => s.value).join('');
|
95
|
+
if (!entryName) {
|
96
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictEmptyName(), entry.keyExpression);
|
97
|
+
return;
|
98
|
+
}
|
99
|
+
if (entryMap.has(entryName)) {
|
100
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictEntryUnique(), entry.keyExpression);
|
101
|
+
return;
|
102
|
+
}
|
103
|
+
// Record names in a map to detect duplicates.
|
104
|
+
entryMap.set(entryName, true);
|
105
|
+
// Cache the annotation type.
|
106
|
+
const annotatedType = evaluator.getTypeOfExpressionExpectingType(entry.valueExpression,
|
107
|
+
/* allowFinal */ true,
|
108
|
+
/* allowRequired */ true);
|
109
|
+
const newSymbol = new symbol_1.Symbol(8 /* InstanceMember */);
|
110
|
+
const declaration = {
|
111
|
+
type: 1 /* Variable */,
|
112
|
+
node: entry.keyExpression,
|
113
|
+
path: fileInfo.filePath,
|
114
|
+
typeAnnotationNode: entry.valueExpression,
|
115
|
+
isRequired: annotatedType.isRequired,
|
116
|
+
isNotRequired: annotatedType.isNotRequired,
|
117
|
+
isRuntimeTypeExpression: true,
|
118
|
+
range: (0, positionUtils_1.convertOffsetsToRange)(entry.keyExpression.start, textRange_1.TextRange.getEnd(entry.keyExpression), fileInfo.lines),
|
119
|
+
moduleName: fileInfo.moduleName,
|
120
|
+
isInExceptSuite: false,
|
121
|
+
};
|
122
|
+
newSymbol.addDeclaration(declaration);
|
123
|
+
classFields.set(entryName, newSymbol);
|
124
|
+
});
|
125
|
+
// Set the type in the type cache for the dict node so it doesn't
|
126
|
+
// get evaluated again.
|
127
|
+
evaluator.setTypeForNode(entryDict);
|
128
|
+
}
|
129
|
+
else if (entriesArg.name) {
|
130
|
+
for (let i = 1; i < argList.length; i++) {
|
131
|
+
const entry = argList[i];
|
132
|
+
if (!entry.name || !entry.valueExpression) {
|
133
|
+
continue;
|
134
|
+
}
|
135
|
+
if (entryMap.has(entry.name.value)) {
|
136
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictEntryUnique(), entry.valueExpression);
|
137
|
+
continue;
|
138
|
+
}
|
139
|
+
// Record names in a map to detect duplicates.
|
140
|
+
entryMap.set(entry.name.value, true);
|
141
|
+
// Evaluate the type with specific evaluation flags. The
|
142
|
+
// type will be cached for later.
|
143
|
+
const annotatedType = evaluator.getTypeOfExpressionExpectingType(entry.valueExpression,
|
144
|
+
/* allowFinal */ true,
|
145
|
+
/* allowRequired */ true);
|
146
|
+
const newSymbol = new symbol_1.Symbol(8 /* InstanceMember */);
|
147
|
+
const fileInfo = AnalyzerNodeInfo.getFileInfo(errorNode);
|
148
|
+
const declaration = {
|
149
|
+
type: 1 /* Variable */,
|
150
|
+
node: entry.name,
|
151
|
+
path: fileInfo.filePath,
|
152
|
+
typeAnnotationNode: entry.valueExpression,
|
153
|
+
isRequired: annotatedType.isRequired,
|
154
|
+
isNotRequired: annotatedType.isNotRequired,
|
155
|
+
isRuntimeTypeExpression: true,
|
156
|
+
range: (0, positionUtils_1.convertOffsetsToRange)(entry.name.start, textRange_1.TextRange.getEnd(entry.valueExpression), fileInfo.lines),
|
157
|
+
moduleName: fileInfo.moduleName,
|
158
|
+
isInExceptSuite: false,
|
159
|
+
};
|
160
|
+
newSymbol.addDeclaration(declaration);
|
161
|
+
classFields.set(entry.name.value, newSymbol);
|
162
|
+
}
|
163
|
+
}
|
164
|
+
else {
|
165
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictSecondArgDict(), errorNode);
|
166
|
+
}
|
167
|
+
}
|
168
|
+
if (usingDictSyntax) {
|
169
|
+
if (argList.length >= 3) {
|
170
|
+
if (!argList[2].name ||
|
171
|
+
argList[2].name.value !== 'total' ||
|
172
|
+
!argList[2].valueExpression ||
|
173
|
+
argList[2].valueExpression.nodeType !== 11 /* Constant */ ||
|
174
|
+
!(argList[2].valueExpression.constType === 15 /* False */ ||
|
175
|
+
argList[2].valueExpression.constType === 33 /* True */)) {
|
176
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictTotalParam(), argList[2].valueExpression || errorNode);
|
177
|
+
}
|
178
|
+
else if (argList[2].valueExpression.constType === 15 /* False */) {
|
179
|
+
classType.details.flags |= 256 /* CanOmitDictValues */;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
if (argList.length > 3) {
|
183
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typedDictExtraArgs(), argList[3].valueExpression || errorNode);
|
184
|
+
}
|
185
|
+
}
|
186
|
+
synthesizeTypedDictClassMethods(evaluator, errorNode, classType, /* isClassFinal */ false);
|
187
|
+
return classType;
|
188
|
+
}
|
189
|
+
exports.createTypedDictType = createTypedDictType;
|
190
|
+
function synthesizeTypedDictClassMethods(evaluator, node, classType, isClassFinal) {
|
191
|
+
(0, debug_1.assert)(types_1.ClassType.isTypedDictClass(classType));
|
192
|
+
// Synthesize a __new__ method.
|
193
|
+
const newType = types_1.FunctionType.createSynthesizedInstance('__new__', 1 /* ConstructorMethod */);
|
194
|
+
types_1.FunctionType.addParameter(newType, {
|
195
|
+
category: 0 /* Simple */,
|
196
|
+
name: 'cls',
|
197
|
+
type: classType,
|
198
|
+
hasDeclaredType: true,
|
199
|
+
});
|
200
|
+
types_1.FunctionType.addDefaultParameters(newType);
|
201
|
+
newType.details.declaredReturnType = types_1.ClassType.cloneAsInstance(classType);
|
202
|
+
// Synthesize an __init__ method.
|
203
|
+
const initType = types_1.FunctionType.createSynthesizedInstance('__init__');
|
204
|
+
types_1.FunctionType.addParameter(initType, {
|
205
|
+
category: 0 /* Simple */,
|
206
|
+
name: 'self',
|
207
|
+
type: types_1.ClassType.cloneAsInstance(classType),
|
208
|
+
hasDeclaredType: true,
|
209
|
+
});
|
210
|
+
initType.details.declaredReturnType = types_1.NoneType.createInstance();
|
211
|
+
// All parameters must be named, so insert an empty "*".
|
212
|
+
types_1.FunctionType.addParameter(initType, {
|
213
|
+
category: 1 /* VarArgList */,
|
214
|
+
type: types_1.AnyType.create(),
|
215
|
+
hasDeclaredType: true,
|
216
|
+
});
|
217
|
+
const entries = getTypedDictMembersForClass(evaluator, classType);
|
218
|
+
entries.forEach((entry, name) => {
|
219
|
+
types_1.FunctionType.addParameter(initType, {
|
220
|
+
category: 0 /* Simple */,
|
221
|
+
name,
|
222
|
+
hasDefault: !entry.isRequired,
|
223
|
+
type: entry.valueType,
|
224
|
+
hasDeclaredType: true,
|
225
|
+
});
|
226
|
+
});
|
227
|
+
const symbolTable = classType.details.fields;
|
228
|
+
symbolTable.set('__init__', symbol_1.Symbol.createWithType(4 /* ClassMember */, initType));
|
229
|
+
symbolTable.set('__new__', symbol_1.Symbol.createWithType(4 /* ClassMember */, newType));
|
230
|
+
const strClass = evaluator.getBuiltInType(node, 'str');
|
231
|
+
// Synthesize a "get", pop, and setdefault method for each named entry.
|
232
|
+
if ((0, types_1.isInstantiableClass)(strClass)) {
|
233
|
+
const selfParam = {
|
234
|
+
category: 0 /* Simple */,
|
235
|
+
name: 'self',
|
236
|
+
type: types_1.ClassType.cloneAsInstance(classType),
|
237
|
+
hasDeclaredType: true,
|
238
|
+
};
|
239
|
+
const createDefaultTypeVar = (func) => {
|
240
|
+
let defaultTypeVar = types_1.TypeVarType.createInstance(`__TDefault`);
|
241
|
+
defaultTypeVar = types_1.TypeVarType.cloneForScopeId(defaultTypeVar, func.details.typeVarScopeId, classType.details.name, 1 /* Function */);
|
242
|
+
return defaultTypeVar;
|
243
|
+
};
|
244
|
+
const createGetMethod = (keyType, valueType, includeDefault, isEntryRequired = false, defaultTypeMatchesField = false) => {
|
245
|
+
const getOverload = types_1.FunctionType.createSynthesizedInstance('get', 256 /* Overloaded */);
|
246
|
+
types_1.FunctionType.addParameter(getOverload, selfParam);
|
247
|
+
getOverload.details.typeVarScopeId = evaluator.getScopeIdForNode(node);
|
248
|
+
types_1.FunctionType.addParameter(getOverload, {
|
249
|
+
category: 0 /* Simple */,
|
250
|
+
name: 'k',
|
251
|
+
type: keyType,
|
252
|
+
hasDeclaredType: true,
|
253
|
+
});
|
254
|
+
if (includeDefault) {
|
255
|
+
const defaultTypeVar = createDefaultTypeVar(getOverload);
|
256
|
+
let defaultParamType;
|
257
|
+
let returnType;
|
258
|
+
if (isEntryRequired) {
|
259
|
+
// If the entry is required, the type of the default param doesn't matter
|
260
|
+
// because the type will always come from the value.
|
261
|
+
defaultParamType = types_1.AnyType.create();
|
262
|
+
returnType = valueType !== null && valueType !== void 0 ? valueType : types_1.AnyType.create();
|
263
|
+
}
|
264
|
+
else {
|
265
|
+
defaultParamType = defaultTypeMatchesField && valueType ? valueType : defaultTypeVar;
|
266
|
+
if (valueType) {
|
267
|
+
returnType = defaultTypeMatchesField ? valueType : (0, types_1.combineTypes)([valueType, defaultTypeVar]);
|
268
|
+
}
|
269
|
+
else {
|
270
|
+
returnType = defaultTypeVar;
|
271
|
+
}
|
272
|
+
}
|
273
|
+
types_1.FunctionType.addParameter(getOverload, {
|
274
|
+
category: 0 /* Simple */,
|
275
|
+
name: 'default',
|
276
|
+
type: defaultParamType,
|
277
|
+
hasDeclaredType: true,
|
278
|
+
});
|
279
|
+
getOverload.details.declaredReturnType = returnType;
|
280
|
+
}
|
281
|
+
else {
|
282
|
+
getOverload.details.declaredReturnType = isEntryRequired
|
283
|
+
? valueType
|
284
|
+
: (0, types_1.combineTypes)([valueType !== null && valueType !== void 0 ? valueType : types_1.AnyType.create(), types_1.NoneType.createInstance()]);
|
285
|
+
}
|
286
|
+
return getOverload;
|
287
|
+
};
|
288
|
+
const createPopMethods = (keyType, valueType) => {
|
289
|
+
const keyParam = {
|
290
|
+
category: 0 /* Simple */,
|
291
|
+
name: 'k',
|
292
|
+
type: keyType,
|
293
|
+
hasDeclaredType: true,
|
294
|
+
};
|
295
|
+
const popOverload1 = types_1.FunctionType.createSynthesizedInstance('pop', 256 /* Overloaded */);
|
296
|
+
types_1.FunctionType.addParameter(popOverload1, selfParam);
|
297
|
+
types_1.FunctionType.addParameter(popOverload1, keyParam);
|
298
|
+
popOverload1.details.declaredReturnType = valueType;
|
299
|
+
const popOverload2 = types_1.FunctionType.createSynthesizedInstance('pop', 256 /* Overloaded */);
|
300
|
+
types_1.FunctionType.addParameter(popOverload2, selfParam);
|
301
|
+
types_1.FunctionType.addParameter(popOverload2, keyParam);
|
302
|
+
popOverload2.details.typeVarScopeId = evaluator.getScopeIdForNode(node);
|
303
|
+
const defaultTypeVar = createDefaultTypeVar(popOverload2);
|
304
|
+
types_1.FunctionType.addParameter(popOverload2, {
|
305
|
+
category: 0 /* Simple */,
|
306
|
+
name: 'default',
|
307
|
+
hasDeclaredType: true,
|
308
|
+
type: defaultTypeVar,
|
309
|
+
hasDefault: true,
|
310
|
+
});
|
311
|
+
popOverload2.details.declaredReturnType = (0, types_1.combineTypes)([valueType, defaultTypeVar]);
|
312
|
+
return [popOverload1, popOverload2];
|
313
|
+
};
|
314
|
+
const createSetDefaultMethod = (keyType, valueType) => {
|
315
|
+
const setDefaultOverload = types_1.FunctionType.createSynthesizedInstance('setdefault', 256 /* Overloaded */);
|
316
|
+
types_1.FunctionType.addParameter(setDefaultOverload, selfParam);
|
317
|
+
types_1.FunctionType.addParameter(setDefaultOverload, {
|
318
|
+
category: 0 /* Simple */,
|
319
|
+
name: 'k',
|
320
|
+
hasDeclaredType: true,
|
321
|
+
type: keyType,
|
322
|
+
});
|
323
|
+
types_1.FunctionType.addParameter(setDefaultOverload, {
|
324
|
+
category: 0 /* Simple */,
|
325
|
+
name: 'default',
|
326
|
+
hasDeclaredType: true,
|
327
|
+
type: valueType,
|
328
|
+
});
|
329
|
+
setDefaultOverload.details.declaredReturnType = valueType;
|
330
|
+
return setDefaultOverload;
|
331
|
+
};
|
332
|
+
const createDelItemMethod = (keyType) => {
|
333
|
+
const delItemOverload = types_1.FunctionType.createSynthesizedInstance('delitem', 256 /* Overloaded */);
|
334
|
+
types_1.FunctionType.addParameter(delItemOverload, selfParam);
|
335
|
+
types_1.FunctionType.addParameter(delItemOverload, {
|
336
|
+
category: 0 /* Simple */,
|
337
|
+
name: 'k',
|
338
|
+
hasDeclaredType: true,
|
339
|
+
type: keyType,
|
340
|
+
});
|
341
|
+
delItemOverload.details.declaredReturnType = types_1.NoneType.createInstance();
|
342
|
+
return delItemOverload;
|
343
|
+
};
|
344
|
+
const getOverloads = [];
|
345
|
+
const popOverloads = [];
|
346
|
+
const setDefaultOverloads = [];
|
347
|
+
entries.forEach((entry, name) => {
|
348
|
+
const nameLiteralType = types_1.ClassType.cloneAsInstance(types_1.ClassType.cloneWithLiteral(strClass, name));
|
349
|
+
getOverloads.push(createGetMethod(nameLiteralType, entry.valueType, /* includeDefault */ false, entry.isRequired));
|
350
|
+
if (entry.isRequired) {
|
351
|
+
getOverloads.push(createGetMethod(nameLiteralType, entry.valueType,
|
352
|
+
/* includeDefault */ true,
|
353
|
+
/* isEntryRequired */ true,
|
354
|
+
/* defaultTypeMatchesField */ true));
|
355
|
+
}
|
356
|
+
else {
|
357
|
+
getOverloads.push(createGetMethod(nameLiteralType, entry.valueType,
|
358
|
+
/* includeDefault */ true,
|
359
|
+
/* isEntryRequired */ false,
|
360
|
+
/* defaultTypeMatchesField */ true));
|
361
|
+
getOverloads.push(createGetMethod(nameLiteralType, entry.valueType,
|
362
|
+
/* includeDefault */ true,
|
363
|
+
/* isEntryRequired */ false,
|
364
|
+
/* defaultTypeMatchesField */ false));
|
365
|
+
}
|
366
|
+
// Add a pop method if the entry is not required.
|
367
|
+
if (!entry.isRequired) {
|
368
|
+
(0, collectionUtils_1.appendArray)(popOverloads, createPopMethods(nameLiteralType, entry.valueType));
|
369
|
+
}
|
370
|
+
setDefaultOverloads.push(createSetDefaultMethod(nameLiteralType, entry.valueType));
|
371
|
+
});
|
372
|
+
// If the class is marked "@final", we can assume that any other literal
|
373
|
+
// key values will return the default parameter value.
|
374
|
+
if (isClassFinal) {
|
375
|
+
const literalStringType = evaluator.getTypingType(node, 'LiteralString');
|
376
|
+
if (literalStringType && (0, types_1.isInstantiableClass)(literalStringType)) {
|
377
|
+
const literalStringInstance = types_1.ClassType.cloneAsInstance(literalStringType);
|
378
|
+
getOverloads.push(createGetMethod(literalStringInstance, types_1.NoneType.createInstance(),
|
379
|
+
/* includeDefault */ false,
|
380
|
+
/* isEntryRequired */ true));
|
381
|
+
getOverloads.push(createGetMethod(literalStringInstance, /* valueType */ undefined, /* includeDefault */ true));
|
382
|
+
}
|
383
|
+
}
|
384
|
+
// Provide a final `get` overload that handles the general case where
|
385
|
+
// the key is a str but the literal value isn't known.
|
386
|
+
const strType = types_1.ClassType.cloneAsInstance(strClass);
|
387
|
+
getOverloads.push(createGetMethod(strType, types_1.AnyType.create(), /* includeDefault */ false));
|
388
|
+
getOverloads.push(createGetMethod(strType, types_1.AnyType.create(), /* includeDefault */ true));
|
389
|
+
symbolTable.set('get', symbol_1.Symbol.createWithType(4 /* ClassMember */, types_1.OverloadedFunctionType.create(getOverloads)));
|
390
|
+
if (popOverloads.length > 0) {
|
391
|
+
symbolTable.set('pop', symbol_1.Symbol.createWithType(4 /* ClassMember */, types_1.OverloadedFunctionType.create(popOverloads)));
|
392
|
+
}
|
393
|
+
if (setDefaultOverloads.length > 0) {
|
394
|
+
symbolTable.set('setdefault', symbol_1.Symbol.createWithType(4 /* ClassMember */, types_1.OverloadedFunctionType.create(setDefaultOverloads)));
|
395
|
+
}
|
396
|
+
symbolTable.set('__delitem__', symbol_1.Symbol.createWithType(4 /* ClassMember */, createDelItemMethod(strType)));
|
397
|
+
}
|
398
|
+
}
|
399
|
+
exports.synthesizeTypedDictClassMethods = synthesizeTypedDictClassMethods;
|
400
|
+
function getTypedDictMembersForClass(evaluator, classType, allowNarrowed = false) {
|
401
|
+
// Were the entries already calculated and cached?
|
402
|
+
if (!classType.details.typedDictEntries) {
|
403
|
+
const entries = new Map();
|
404
|
+
getTypedDictMembersForClassRecursive(evaluator, classType, entries);
|
405
|
+
// Cache the entries for next time.
|
406
|
+
classType.details.typedDictEntries = entries;
|
407
|
+
}
|
408
|
+
const typeVarContext = (0, typeUtils_1.buildTypeVarContextFromSpecializedClass)(classType);
|
409
|
+
// Create a specialized copy of the entries so the caller can mutate them.
|
410
|
+
const entries = new Map();
|
411
|
+
classType.details.typedDictEntries.forEach((value, key) => {
|
412
|
+
const tdEntry = { ...value };
|
413
|
+
tdEntry.valueType = (0, typeUtils_1.applySolvedTypeVars)(tdEntry.valueType, typeVarContext);
|
414
|
+
entries.set(key, tdEntry);
|
415
|
+
});
|
416
|
+
// Apply narrowed types on top of existing entries if present.
|
417
|
+
if (allowNarrowed && classType.typedDictNarrowedEntries) {
|
418
|
+
classType.typedDictNarrowedEntries.forEach((value, key) => {
|
419
|
+
const tdEntry = { ...value };
|
420
|
+
tdEntry.valueType = (0, typeUtils_1.applySolvedTypeVars)(tdEntry.valueType, typeVarContext);
|
421
|
+
entries.set(key, tdEntry);
|
422
|
+
});
|
423
|
+
}
|
424
|
+
return entries;
|
425
|
+
}
|
426
|
+
exports.getTypedDictMembersForClass = getTypedDictMembersForClass;
|
427
|
+
function getTypedDictMembersForClassRecursive(evaluator, classType, keyMap, recursionCount = 0) {
|
428
|
+
(0, debug_1.assert)(types_1.ClassType.isTypedDictClass(classType));
|
429
|
+
if (recursionCount > types_1.maxTypeRecursionCount) {
|
430
|
+
return;
|
431
|
+
}
|
432
|
+
recursionCount++;
|
433
|
+
classType.details.baseClasses.forEach((baseClassType) => {
|
434
|
+
if ((0, types_1.isInstantiableClass)(baseClassType) && types_1.ClassType.isTypedDictClass(baseClassType)) {
|
435
|
+
getTypedDictMembersForClassRecursive(evaluator, baseClassType, keyMap, recursionCount);
|
436
|
+
}
|
437
|
+
});
|
438
|
+
const typeVarContext = (0, typeUtils_1.buildTypeVarContextFromSpecializedClass)(classType);
|
439
|
+
// Add any new typed dict entries from this class.
|
440
|
+
classType.details.fields.forEach((symbol, name) => {
|
441
|
+
if (!symbol.isIgnoredForProtocolMatch()) {
|
442
|
+
// Only variables (not functions, classes, etc.) are considered.
|
443
|
+
const lastDecl = (0, symbolUtils_1.getLastTypedDeclaredForSymbol)(symbol);
|
444
|
+
if (lastDecl && lastDecl.type === 1 /* Variable */) {
|
445
|
+
let valueType = evaluator.getEffectiveTypeOfSymbol(symbol);
|
446
|
+
valueType = (0, typeUtils_1.applySolvedTypeVars)(valueType, typeVarContext);
|
447
|
+
let isRequired = !types_1.ClassType.isCanOmitDictValues(classType);
|
448
|
+
if ((0, symbolUtils_1.isRequiredTypedDictVariable)(symbol)) {
|
449
|
+
isRequired = true;
|
450
|
+
}
|
451
|
+
else if ((0, symbolUtils_1.isNotRequiredTypedDictVariable)(symbol)) {
|
452
|
+
isRequired = false;
|
453
|
+
}
|
454
|
+
// If a base class already declares this field, verify that the
|
455
|
+
// subclass isn't trying to change its type. That's expressly
|
456
|
+
// forbidden in PEP 589.
|
457
|
+
const existingEntry = keyMap.get(name);
|
458
|
+
if (existingEntry) {
|
459
|
+
if (!(0, types_1.isTypeSame)(existingEntry.valueType, valueType)) {
|
460
|
+
const diag = new diagnostic_1.DiagnosticAddendum();
|
461
|
+
diag.addMessage(localize_1.Localizer.DiagnosticAddendum.typedDictFieldRedefinition().format({
|
462
|
+
parentType: evaluator.printType(existingEntry.valueType),
|
463
|
+
childType: evaluator.printType(valueType),
|
464
|
+
}));
|
465
|
+
evaluator.addDiagnostic(AnalyzerNodeInfo.getFileInfo(lastDecl.node).diagnosticRuleSet.reportGeneralTypeIssues, diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.Localizer.Diagnostic.typedDictFieldRedefinition().format({
|
466
|
+
name,
|
467
|
+
}) + diag.getString(), lastDecl.node);
|
468
|
+
}
|
469
|
+
}
|
470
|
+
keyMap.set(name, {
|
471
|
+
valueType,
|
472
|
+
isRequired,
|
473
|
+
isProvided: false,
|
474
|
+
});
|
475
|
+
}
|
476
|
+
}
|
477
|
+
});
|
478
|
+
}
|
479
|
+
function assignTypedDictToTypedDict(evaluator, destType, srcType, diag, typeVarContext, flags, recursionCount = 0) {
|
480
|
+
let typesAreConsistent = true;
|
481
|
+
const destEntries = getTypedDictMembersForClass(evaluator, destType);
|
482
|
+
const srcEntries = getTypedDictMembersForClass(evaluator, srcType, /* allowNarrowed */ true);
|
483
|
+
destEntries.forEach((destEntry, name) => {
|
484
|
+
const srcEntry = srcEntries.get(name);
|
485
|
+
if (!srcEntry) {
|
486
|
+
diag === null || diag === void 0 ? void 0 : diag.createAddendum().addMessage(localize_1.Localizer.DiagnosticAddendum.typedDictFieldMissing().format({
|
487
|
+
name,
|
488
|
+
type: evaluator.printType(srcType),
|
489
|
+
}));
|
490
|
+
typesAreConsistent = false;
|
491
|
+
}
|
492
|
+
else {
|
493
|
+
if (destEntry.isRequired && !srcEntry.isRequired) {
|
494
|
+
diag === null || diag === void 0 ? void 0 : diag.createAddendum().addMessage(localize_1.Localizer.DiagnosticAddendum.typedDictFieldRequired().format({
|
495
|
+
name,
|
496
|
+
type: evaluator.printType(destType),
|
497
|
+
}));
|
498
|
+
typesAreConsistent = false;
|
499
|
+
}
|
500
|
+
else if (!destEntry.isRequired && srcEntry.isRequired) {
|
501
|
+
diag === null || diag === void 0 ? void 0 : diag.createAddendum().addMessage(localize_1.Localizer.DiagnosticAddendum.typedDictFieldNotRequired().format({
|
502
|
+
name,
|
503
|
+
type: evaluator.printType(destType),
|
504
|
+
}));
|
505
|
+
typesAreConsistent = false;
|
506
|
+
}
|
507
|
+
const subDiag = diag === null || diag === void 0 ? void 0 : diag.createAddendum();
|
508
|
+
if (!evaluator.assignType(destEntry.valueType, srcEntry.valueType, subDiag === null || subDiag === void 0 ? void 0 : subDiag.createAddendum(), typeVarContext,
|
509
|
+
/* srcTypeVarContext */ undefined, flags, recursionCount)) {
|
510
|
+
subDiag === null || subDiag === void 0 ? void 0 : subDiag.addMessage(localize_1.Localizer.DiagnosticAddendum.memberTypeMismatch().format({ name }));
|
511
|
+
typesAreConsistent = false;
|
512
|
+
}
|
513
|
+
}
|
514
|
+
});
|
515
|
+
return typesAreConsistent;
|
516
|
+
}
|
517
|
+
exports.assignTypedDictToTypedDict = assignTypedDictToTypedDict;
|
518
|
+
// Determines whether the specified keys and values can be assigned to
|
519
|
+
// a typed dictionary class. The caller should have already validated
|
520
|
+
// that the class is indeed a typed dict. If the types are compatible,
|
521
|
+
// the typed dict class or a narrowed form of the class is returned.
|
522
|
+
// Narrowing is possible when not-required keys are provided. If the
|
523
|
+
// types are not compatible, the function returns undefined.
|
524
|
+
function assignToTypedDict(evaluator, classType, keyTypes, valueTypes, diagAddendum) {
|
525
|
+
(0, debug_1.assert)((0, types_1.isClassInstance)(classType));
|
526
|
+
(0, debug_1.assert)(types_1.ClassType.isTypedDictClass(classType));
|
527
|
+
(0, debug_1.assert)(keyTypes.length === valueTypes.length);
|
528
|
+
let isMatch = true;
|
529
|
+
const narrowedEntries = new Map();
|
530
|
+
let typeVarContext;
|
531
|
+
let genericClassType = classType;
|
532
|
+
if (classType.details.typeParameters.length > 0) {
|
533
|
+
typeVarContext = new typeVarContext_1.TypeVarContext((0, typeUtils_1.getTypeVarScopeId)(classType));
|
534
|
+
// Create a generic (nonspecialized version) of the class.
|
535
|
+
if (classType.typeArguments) {
|
536
|
+
genericClassType = types_1.ClassType.cloneForSpecialization(classType,
|
537
|
+
/* typeArguments */ undefined,
|
538
|
+
/* isTypeArgumentExplicit */ false);
|
539
|
+
}
|
540
|
+
}
|
541
|
+
const symbolMap = getTypedDictMembersForClass(evaluator, genericClassType);
|
542
|
+
keyTypes.forEach((keyType, index) => {
|
543
|
+
if (!(0, types_1.isClassInstance)(keyType) || !types_1.ClassType.isBuiltIn(keyType, 'str') || !(0, typeUtils_1.isLiteralType)(keyType)) {
|
544
|
+
isMatch = false;
|
545
|
+
}
|
546
|
+
else {
|
547
|
+
const keyValue = keyType.literalValue;
|
548
|
+
const symbolEntry = symbolMap.get(keyValue);
|
549
|
+
if (!symbolEntry) {
|
550
|
+
// The provided key name doesn't exist.
|
551
|
+
isMatch = false;
|
552
|
+
if (diagAddendum) {
|
553
|
+
diagAddendum.addMessage(localize_1.Localizer.DiagnosticAddendum.typedDictFieldUndefined().format({
|
554
|
+
name: keyType.literalValue,
|
555
|
+
type: evaluator.printType(types_1.ClassType.cloneAsInstance(classType)),
|
556
|
+
}));
|
557
|
+
}
|
558
|
+
}
|
559
|
+
else {
|
560
|
+
// Can we assign the value to the declared type?
|
561
|
+
const subDiag = diagAddendum === null || diagAddendum === void 0 ? void 0 : diagAddendum.createAddendum();
|
562
|
+
if (!evaluator.assignType(symbolEntry.valueType, valueTypes[index], subDiag === null || subDiag === void 0 ? void 0 : subDiag.createAddendum(), typeVarContext)) {
|
563
|
+
if (subDiag) {
|
564
|
+
subDiag.addMessage(localize_1.Localizer.DiagnosticAddendum.typedDictFieldTypeMismatch().format({
|
565
|
+
name: keyType.literalValue,
|
566
|
+
type: evaluator.printType(valueTypes[index]),
|
567
|
+
}));
|
568
|
+
}
|
569
|
+
isMatch = false;
|
570
|
+
}
|
571
|
+
if (!symbolEntry.isRequired) {
|
572
|
+
narrowedEntries.set(keyValue, {
|
573
|
+
valueType: valueTypes[index],
|
574
|
+
isRequired: false,
|
575
|
+
isProvided: true,
|
576
|
+
});
|
577
|
+
}
|
578
|
+
symbolEntry.isProvided = true;
|
579
|
+
}
|
580
|
+
}
|
581
|
+
});
|
582
|
+
if (!isMatch) {
|
583
|
+
return undefined;
|
584
|
+
}
|
585
|
+
// See if any required keys are missing.
|
586
|
+
symbolMap.forEach((entry, name) => {
|
587
|
+
if (entry.isRequired && !entry.isProvided) {
|
588
|
+
if (diagAddendum) {
|
589
|
+
diagAddendum.addMessage(localize_1.Localizer.DiagnosticAddendum.typedDictFieldRequired().format({
|
590
|
+
name,
|
591
|
+
type: evaluator.printType(classType),
|
592
|
+
}));
|
593
|
+
}
|
594
|
+
isMatch = false;
|
595
|
+
}
|
596
|
+
});
|
597
|
+
if (!isMatch) {
|
598
|
+
return undefined;
|
599
|
+
}
|
600
|
+
const specializedClassType = typeVarContext
|
601
|
+
? (0, typeUtils_1.applySolvedTypeVars)(genericClassType, typeVarContext)
|
602
|
+
: classType;
|
603
|
+
return narrowedEntries.size === 0
|
604
|
+
? specializedClassType
|
605
|
+
: types_1.ClassType.cloneForNarrowedTypedDictEntries(specializedClassType, narrowedEntries);
|
606
|
+
}
|
607
|
+
exports.assignToTypedDict = assignToTypedDict;
|
608
|
+
function getTypeOfIndexedTypedDict(evaluator, node, baseType, usage) {
|
609
|
+
if (node.items.length !== 1) {
|
610
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.typeArgsMismatchOne().format({ received: node.items.length }), node);
|
611
|
+
return { node, type: types_1.UnknownType.create() };
|
612
|
+
}
|
613
|
+
// Look for subscript types that are not supported by TypedDict.
|
614
|
+
if (node.trailingComma || node.items[0].name || node.items[0].argumentCategory !== 0 /* Simple */) {
|
615
|
+
return undefined;
|
616
|
+
}
|
617
|
+
const entries = getTypedDictMembersForClass(evaluator, baseType, /* allowNarrowed */ usage.method === 'get');
|
618
|
+
const indexTypeResult = evaluator.getTypeOfExpression(node.items[0].valueExpression);
|
619
|
+
const indexType = indexTypeResult.type;
|
620
|
+
let diag = new diagnostic_1.DiagnosticAddendum();
|
621
|
+
let allDiagsInvolveNotRequiredKeys = true;
|
622
|
+
const resultingType = (0, typeUtils_1.mapSubtypes)(indexType, (subtype) => {
|
623
|
+
if ((0, types_1.isAnyOrUnknown)(subtype)) {
|
624
|
+
return subtype;
|
625
|
+
}
|
626
|
+
if ((0, types_1.isClassInstance)(subtype) && types_1.ClassType.isBuiltIn(subtype, 'str')) {
|
627
|
+
if (subtype.literalValue === undefined) {
|
628
|
+
// If it's a plain str with no literal value, we can't
|
629
|
+
// make any determination about the resulting type.
|
630
|
+
return types_1.UnknownType.create();
|
631
|
+
}
|
632
|
+
// Look up the entry in the typed dict to get its type.
|
633
|
+
const entryName = subtype.literalValue;
|
634
|
+
const entry = entries.get(entryName);
|
635
|
+
if (!entry) {
|
636
|
+
diag.addMessage(localize_1.Localizer.DiagnosticAddendum.keyUndefined().format({
|
637
|
+
name: entryName,
|
638
|
+
type: evaluator.printType(baseType),
|
639
|
+
}));
|
640
|
+
allDiagsInvolveNotRequiredKeys = false;
|
641
|
+
return types_1.UnknownType.create();
|
642
|
+
}
|
643
|
+
else if (!(entry.isRequired || entry.isProvided) && usage.method === 'get') {
|
644
|
+
if (!ParseTreeUtils.isWithinTryBlock(node, /* treatWithAsTryBlock */ true)) {
|
645
|
+
diag.addMessage(localize_1.Localizer.DiagnosticAddendum.keyNotRequired().format({
|
646
|
+
name: entryName,
|
647
|
+
type: evaluator.printType(baseType),
|
648
|
+
}));
|
649
|
+
}
|
650
|
+
}
|
651
|
+
if (usage.method === 'set') {
|
652
|
+
if (!evaluator.assignType(entry.valueType, usage.setType || types_1.AnyType.create(), diag)) {
|
653
|
+
allDiagsInvolveNotRequiredKeys = false;
|
654
|
+
}
|
655
|
+
}
|
656
|
+
else if (usage.method === 'del' && entry.isRequired) {
|
657
|
+
diag.addMessage(localize_1.Localizer.DiagnosticAddendum.keyRequiredDeleted().format({
|
658
|
+
name: entryName,
|
659
|
+
}));
|
660
|
+
allDiagsInvolveNotRequiredKeys = false;
|
661
|
+
}
|
662
|
+
return entry.valueType;
|
663
|
+
}
|
664
|
+
diag.addMessage(localize_1.Localizer.DiagnosticAddendum.typeNotStringLiteral().format({ type: evaluator.printType(subtype) }));
|
665
|
+
allDiagsInvolveNotRequiredKeys = false;
|
666
|
+
return types_1.UnknownType.create();
|
667
|
+
});
|
668
|
+
// If we have an "expected type" diagnostic addendum (used for assignments),
|
669
|
+
// use that rather than the local diagnostic information because it will
|
670
|
+
// be more informative.
|
671
|
+
if (usage.setExpectedTypeDiag && !diag.isEmpty() && !usage.setExpectedTypeDiag.isEmpty()) {
|
672
|
+
diag = usage.setExpectedTypeDiag;
|
673
|
+
}
|
674
|
+
if (!diag.isEmpty()) {
|
675
|
+
let typedDictDiag;
|
676
|
+
if (usage.method === 'set') {
|
677
|
+
typedDictDiag = localize_1.Localizer.Diagnostic.typedDictSet();
|
678
|
+
}
|
679
|
+
else if (usage.method === 'del') {
|
680
|
+
typedDictDiag = localize_1.Localizer.Diagnostic.typedDictDelete();
|
681
|
+
}
|
682
|
+
else {
|
683
|
+
typedDictDiag = localize_1.Localizer.Diagnostic.typedDictAccess();
|
684
|
+
}
|
685
|
+
const fileInfo = AnalyzerNodeInfo.getFileInfo(node);
|
686
|
+
evaluator.addDiagnostic(allDiagsInvolveNotRequiredKeys
|
687
|
+
? fileInfo.diagnosticRuleSet.reportTypedDictNotRequiredAccess
|
688
|
+
: fileInfo.diagnosticRuleSet.reportGeneralTypeIssues, allDiagsInvolveNotRequiredKeys
|
689
|
+
? diagnosticRules_1.DiagnosticRule.reportTypedDictNotRequiredAccess
|
690
|
+
: diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, typedDictDiag + diag.getString(), node);
|
691
|
+
}
|
692
|
+
return { node, type: resultingType, isIncomplete: !!indexTypeResult.isIncomplete };
|
693
|
+
}
|
694
|
+
exports.getTypeOfIndexedTypedDict = getTypeOfIndexedTypedDict;
|
695
|
+
//# sourceMappingURL=typedDicts.js.map
|