@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,908 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* packageTypeVerifier.ts
|
4
|
+
* Copyright (c) Microsoft Corporation.
|
5
|
+
* Licensed under the MIT license.
|
6
|
+
* Author: Eric Traut
|
7
|
+
*
|
8
|
+
* Validates the public symbols exported by a package to ensure
|
9
|
+
* that the types are complete.
|
10
|
+
*/
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.PackageTypeVerifier = void 0;
|
13
|
+
const configOptions_1 = require("../common/configOptions");
|
14
|
+
const debug_1 = require("../common/debug");
|
15
|
+
const diagnostic_1 = require("../common/diagnostic");
|
16
|
+
const fullAccessHost_1 = require("../common/fullAccessHost");
|
17
|
+
const pathUtils_1 = require("../common/pathUtils");
|
18
|
+
const textRange_1 = require("../common/textRange");
|
19
|
+
const importResolver_1 = require("./importResolver");
|
20
|
+
const packageTypeReport_1 = require("./packageTypeReport");
|
21
|
+
const program_1 = require("./program");
|
22
|
+
const pyTypedUtils_1 = require("./pyTypedUtils");
|
23
|
+
const scopeUtils_1 = require("./scopeUtils");
|
24
|
+
const symbolNameUtils_1 = require("./symbolNameUtils");
|
25
|
+
const types_1 = require("./types");
|
26
|
+
const typeUtils_1 = require("./typeUtils");
|
27
|
+
class PackageTypeVerifier {
|
28
|
+
constructor(_fileSystem, _packageName, _ignoreExternal = false) {
|
29
|
+
this._fileSystem = _fileSystem;
|
30
|
+
this._packageName = _packageName;
|
31
|
+
this._ignoreExternal = _ignoreExternal;
|
32
|
+
this._configOptions = new configOptions_1.ConfigOptions('');
|
33
|
+
if (_ignoreExternal) {
|
34
|
+
this._configOptions.evaluateUnknownImportsAsAny = true;
|
35
|
+
}
|
36
|
+
this._execEnv = this._configOptions.findExecEnvironment('.');
|
37
|
+
this._importResolver = new importResolver_1.ImportResolver(this._fileSystem, this._configOptions, new fullAccessHost_1.FullAccessHost(this._fileSystem));
|
38
|
+
this._program = new program_1.Program(this._importResolver, this._configOptions);
|
39
|
+
}
|
40
|
+
verify() {
|
41
|
+
var _a, _b;
|
42
|
+
const trimmedModuleName = this._packageName.trim();
|
43
|
+
const moduleNameParts = trimmedModuleName.split('.');
|
44
|
+
const report = (0, packageTypeReport_1.getEmptyReport)(moduleNameParts[0], (_a = this._getDirectoryForModule(moduleNameParts[0])) !== null && _a !== void 0 ? _a : '', trimmedModuleName, (_b = this._getDirectoryForModule(trimmedModuleName)) !== null && _b !== void 0 ? _b : '', this._ignoreExternal);
|
45
|
+
const commonDiagnostics = report.generalDiagnostics;
|
46
|
+
try {
|
47
|
+
if (!trimmedModuleName) {
|
48
|
+
commonDiagnostics.push(new diagnostic_1.Diagnostic(0 /* Error */, `Module name "${trimmedModuleName}" is invalid`, (0, textRange_1.getEmptyRange)()));
|
49
|
+
}
|
50
|
+
else if (!report.moduleRootDirectory) {
|
51
|
+
commonDiagnostics.push(new diagnostic_1.Diagnostic(0 /* Error */, `Module "${trimmedModuleName}" cannot be resolved`, (0, textRange_1.getEmptyRange)()));
|
52
|
+
}
|
53
|
+
else {
|
54
|
+
let pyTypedInfo;
|
55
|
+
if (report.moduleRootDirectory) {
|
56
|
+
pyTypedInfo = this._getDeepestPyTypedInfo(report.moduleRootDirectory, moduleNameParts);
|
57
|
+
}
|
58
|
+
// If we couldn't find any "py.typed" info in the module path, search again
|
59
|
+
// starting at the package root.
|
60
|
+
if (!pyTypedInfo && report.packageRootDirectory) {
|
61
|
+
pyTypedInfo = this._getDeepestPyTypedInfo(report.packageRootDirectory, moduleNameParts);
|
62
|
+
}
|
63
|
+
if (!pyTypedInfo) {
|
64
|
+
commonDiagnostics.push(new diagnostic_1.Diagnostic(0 /* Error */, 'No py.typed file found', (0, textRange_1.getEmptyRange)()));
|
65
|
+
}
|
66
|
+
else {
|
67
|
+
report.pyTypedPath = pyTypedInfo.pyTypedPath;
|
68
|
+
const publicModules = this._getListOfPublicModules(report.moduleRootDirectory, trimmedModuleName);
|
69
|
+
// If the filter eliminated all modules, report an error.
|
70
|
+
if (publicModules.length === 0) {
|
71
|
+
commonDiagnostics.push(new diagnostic_1.Diagnostic(0 /* Error */, `Module "${trimmedModuleName}" cannot be resolved`, (0, textRange_1.getEmptyRange)()));
|
72
|
+
}
|
73
|
+
// Build a map of all public symbols exported by this package. We'll
|
74
|
+
// use this map to determine which diagnostics to report. We don't want
|
75
|
+
// to report diagnostics many times for types that include public types.
|
76
|
+
const publicSymbolMap = new Map();
|
77
|
+
publicModules.forEach((moduleName) => {
|
78
|
+
this._getPublicSymbolsForModule(moduleName, publicSymbolMap, report.alternateSymbolNames);
|
79
|
+
});
|
80
|
+
publicModules.forEach((moduleName) => {
|
81
|
+
this._verifyTypesOfModule(moduleName, publicSymbolMap, report);
|
82
|
+
});
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
catch (e) {
|
87
|
+
const message = (e.stack ? e.stack.toString() : undefined) ||
|
88
|
+
(typeof e.message === 'string' ? e.message : undefined) ||
|
89
|
+
JSON.stringify(e);
|
90
|
+
commonDiagnostics.push(new diagnostic_1.Diagnostic(0 /* Error */, `An internal error occurred while verifying types: "${message}"`, (0, textRange_1.getEmptyRange)()));
|
91
|
+
}
|
92
|
+
return report;
|
93
|
+
}
|
94
|
+
static getSymbolCategoryString(symbolType) {
|
95
|
+
switch (symbolType) {
|
96
|
+
case packageTypeReport_1.SymbolCategory.Class:
|
97
|
+
return 'class';
|
98
|
+
case packageTypeReport_1.SymbolCategory.Function:
|
99
|
+
return 'function';
|
100
|
+
case packageTypeReport_1.SymbolCategory.Method:
|
101
|
+
return 'method';
|
102
|
+
case packageTypeReport_1.SymbolCategory.Constant:
|
103
|
+
return 'constant';
|
104
|
+
case packageTypeReport_1.SymbolCategory.Variable:
|
105
|
+
return 'variable';
|
106
|
+
case packageTypeReport_1.SymbolCategory.Module:
|
107
|
+
return 'module';
|
108
|
+
case packageTypeReport_1.SymbolCategory.TypeAlias:
|
109
|
+
return 'type alias';
|
110
|
+
case packageTypeReport_1.SymbolCategory.TypeVar:
|
111
|
+
return 'type variable';
|
112
|
+
case packageTypeReport_1.SymbolCategory.Indeterminate:
|
113
|
+
return 'symbol';
|
114
|
+
}
|
115
|
+
}
|
116
|
+
_getDeepestPyTypedInfo(rootDirectory, packageNameParts) {
|
117
|
+
let subNameParts = [...packageNameParts];
|
118
|
+
// Find the deepest py.typed file that corresponds to the requested submodule.
|
119
|
+
while (subNameParts.length >= 1) {
|
120
|
+
const packageSubdir = (0, pathUtils_1.combinePaths)(rootDirectory, ...subNameParts.slice(1));
|
121
|
+
const pyTypedInfo = (0, pyTypedUtils_1.getPyTypedInfo)(this._fileSystem, packageSubdir);
|
122
|
+
if (pyTypedInfo) {
|
123
|
+
return pyTypedInfo;
|
124
|
+
}
|
125
|
+
subNameParts = subNameParts.slice(0, subNameParts.length - 1);
|
126
|
+
}
|
127
|
+
return undefined;
|
128
|
+
}
|
129
|
+
_resolveImport(moduleName) {
|
130
|
+
return this._importResolver.resolveImport('', this._execEnv, (0, importResolver_1.createImportedModuleDescriptor)(moduleName));
|
131
|
+
}
|
132
|
+
_getPublicSymbolsForModule(moduleName, symbolMap, alternateSymbolNames) {
|
133
|
+
const importResult = this._resolveImport(moduleName);
|
134
|
+
if (importResult.isImportFound) {
|
135
|
+
const modulePath = importResult.resolvedPaths[importResult.resolvedPaths.length - 1];
|
136
|
+
this._program.addTrackedFiles([modulePath], /* isThirdPartyImport */ true, /* isInPyTypedPackage */ true);
|
137
|
+
const sourceFile = this._program.getBoundSourceFile(modulePath);
|
138
|
+
if (sourceFile) {
|
139
|
+
const module = {
|
140
|
+
name: moduleName,
|
141
|
+
path: modulePath,
|
142
|
+
isExported: true,
|
143
|
+
};
|
144
|
+
const parseTree = sourceFile.getParseResults().parseTree;
|
145
|
+
const moduleScope = (0, scopeUtils_1.getScopeForNode)(parseTree);
|
146
|
+
this._getPublicSymbolsInSymbolTable(symbolMap, alternateSymbolNames, module, module.name, moduleScope.symbolTable, 3 /* Module */);
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
_getPublicSymbolsInSymbolTable(symbolMap, alternateSymbolNames, module, scopeName, symbolTable, scopeType) {
|
151
|
+
symbolTable.forEach((symbol, name) => {
|
152
|
+
if (!(0, symbolNameUtils_1.isPrivateOrProtectedName)(name) &&
|
153
|
+
!symbol.isIgnoredForProtocolMatch() &&
|
154
|
+
!this._isSymbolTypeImplied(scopeType, name)) {
|
155
|
+
const fullName = `${scopeName}.${name}`;
|
156
|
+
if (!symbol.isExternallyHidden() && !symbol.isPrivateMember() && !symbol.isPrivatePyTypedImport()) {
|
157
|
+
const symbolType = this._program.getTypeOfSymbol(symbol);
|
158
|
+
symbolMap.set(fullName, fullName);
|
159
|
+
const typedDecls = symbol.getTypedDeclarations();
|
160
|
+
if (typedDecls.length > 0) {
|
161
|
+
// Is this a class declared within this module or class?
|
162
|
+
// If so, add the symbols declared within it.
|
163
|
+
const classDecl = typedDecls.find((decl) => decl.type === 4 /* Class */);
|
164
|
+
if (classDecl) {
|
165
|
+
if ((0, types_1.isInstantiableClass)(symbolType)) {
|
166
|
+
this._getPublicSymbolsInSymbolTable(symbolMap, alternateSymbolNames, module, fullName, symbolType.details.fields, 2 /* Class */);
|
167
|
+
}
|
168
|
+
}
|
169
|
+
}
|
170
|
+
// Is this the re-export of an import? If so, record the alternate name.
|
171
|
+
const importDecl = symbol.getDeclarations().find((decl) => decl.type === 6 /* Alias */);
|
172
|
+
if (importDecl && importDecl.type === 6 /* Alias */) {
|
173
|
+
const typeName = (0, typeUtils_1.getFullNameOfType)(this._program.getTypeOfSymbol(symbol));
|
174
|
+
if (typeName) {
|
175
|
+
this._addAlternateSymbolName(alternateSymbolNames, typeName, fullName);
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
180
|
+
});
|
181
|
+
}
|
182
|
+
_addAlternateSymbolName(map, name, altName) {
|
183
|
+
if (name !== altName) {
|
184
|
+
let altNameList = map.get(name);
|
185
|
+
if (!altNameList) {
|
186
|
+
altNameList = [];
|
187
|
+
map.set(name, altNameList);
|
188
|
+
}
|
189
|
+
// Add the alternate name if it's unique.
|
190
|
+
if (!altNameList.some((name) => name === altName)) {
|
191
|
+
altNameList.push(altName);
|
192
|
+
}
|
193
|
+
}
|
194
|
+
}
|
195
|
+
_verifyTypesOfModule(moduleName, publicSymbolMap, report) {
|
196
|
+
const importResult = this._resolveImport(moduleName);
|
197
|
+
if (!importResult.isImportFound) {
|
198
|
+
report.generalDiagnostics.push(new diagnostic_1.Diagnostic(0 /* Error */, `Could not resolve module "${moduleName}"`, (0, textRange_1.getEmptyRange)()));
|
199
|
+
}
|
200
|
+
else if (importResult.isStubPackage) {
|
201
|
+
report.generalDiagnostics.push(new diagnostic_1.Diagnostic(0 /* Error */, `No inlined types found for module "${moduleName}" because stub package was present`, (0, textRange_1.getEmptyRange)()));
|
202
|
+
}
|
203
|
+
else {
|
204
|
+
const modulePath = importResult.resolvedPaths[importResult.resolvedPaths.length - 1];
|
205
|
+
const module = {
|
206
|
+
name: moduleName,
|
207
|
+
path: modulePath,
|
208
|
+
isExported: true,
|
209
|
+
};
|
210
|
+
report.modules.set(modulePath, module);
|
211
|
+
this._program.addTrackedFiles([modulePath], /* isThirdPartyImport */ true, /* isInPyTypedPackage */ true);
|
212
|
+
const sourceFile = this._program.getBoundSourceFile(modulePath);
|
213
|
+
if (sourceFile) {
|
214
|
+
const parseTree = sourceFile.getParseResults().parseTree;
|
215
|
+
const moduleScope = (0, scopeUtils_1.getScopeForNode)(parseTree);
|
216
|
+
this._getTypeKnownStatusForSymbolTable(report, module.name, moduleScope.symbolTable, 3 /* Module */, publicSymbolMap);
|
217
|
+
}
|
218
|
+
else {
|
219
|
+
report.generalDiagnostics.push(new diagnostic_1.Diagnostic(0 /* Error */, `Could not bind file "${modulePath}"`, (0, textRange_1.getEmptyRange)()));
|
220
|
+
}
|
221
|
+
}
|
222
|
+
}
|
223
|
+
// Scans the directory structure for a list of public modules
|
224
|
+
// within the package.
|
225
|
+
_getListOfPublicModules(moduleRootPath, moduleName) {
|
226
|
+
const publicModules = [];
|
227
|
+
this._addPublicModulesRecursive(moduleRootPath, moduleName, publicModules);
|
228
|
+
// Make sure modules are unique. There may be duplicates if a ".py" and ".pyi"
|
229
|
+
// exist for some modules.
|
230
|
+
const uniqueModules = [];
|
231
|
+
const moduleMap = new Map();
|
232
|
+
publicModules.forEach((module) => {
|
233
|
+
if (!moduleMap.has(module)) {
|
234
|
+
uniqueModules.push(module);
|
235
|
+
moduleMap.set(module, module);
|
236
|
+
}
|
237
|
+
});
|
238
|
+
return uniqueModules;
|
239
|
+
}
|
240
|
+
_addPublicModulesRecursive(dirPath, modulePath, publicModules) {
|
241
|
+
const dirEntries = this._fileSystem.readdirEntriesSync(dirPath);
|
242
|
+
dirEntries.forEach((entry) => {
|
243
|
+
let isFile = entry.isFile();
|
244
|
+
let isDirectory = entry.isDirectory();
|
245
|
+
if (entry.isSymbolicLink()) {
|
246
|
+
const stat = (0, pathUtils_1.tryStat)(this._fileSystem, (0, pathUtils_1.combinePaths)(dirPath, entry.name));
|
247
|
+
if (stat) {
|
248
|
+
isFile = stat.isFile();
|
249
|
+
isDirectory = stat.isDirectory();
|
250
|
+
}
|
251
|
+
}
|
252
|
+
if (isFile) {
|
253
|
+
const fileExtension = (0, pathUtils_1.getFileExtension)(entry.name);
|
254
|
+
if (fileExtension === '.py' || fileExtension === '.pyi') {
|
255
|
+
const nameWithoutExtension = (0, pathUtils_1.stripFileExtension)(entry.name);
|
256
|
+
if (nameWithoutExtension === '__init__') {
|
257
|
+
publicModules.push(modulePath);
|
258
|
+
}
|
259
|
+
else {
|
260
|
+
if (!(0, symbolNameUtils_1.isPrivateOrProtectedName)(nameWithoutExtension) &&
|
261
|
+
this._isLegalModulePartName(nameWithoutExtension)) {
|
262
|
+
publicModules.push(`${modulePath}.${nameWithoutExtension}`);
|
263
|
+
}
|
264
|
+
}
|
265
|
+
}
|
266
|
+
}
|
267
|
+
else if (isDirectory) {
|
268
|
+
if (!(0, symbolNameUtils_1.isPrivateOrProtectedName)(entry.name) && this._isLegalModulePartName(entry.name)) {
|
269
|
+
this._addPublicModulesRecursive((0, pathUtils_1.combinePaths)(dirPath, entry.name), `${modulePath}.${entry.name}`, publicModules);
|
270
|
+
}
|
271
|
+
}
|
272
|
+
});
|
273
|
+
}
|
274
|
+
_isLegalModulePartName(name) {
|
275
|
+
// PEP8 indicates that all module names should be lowercase
|
276
|
+
// with underscores. It doesn't talk about non-ASCII
|
277
|
+
// characters, but it appears that's the convention.
|
278
|
+
return !!name.match(/[a-z_]+/);
|
279
|
+
}
|
280
|
+
_shouldIgnoreType(report, fullTypeName) {
|
281
|
+
// If we're ignoring unknown types from other packages, see if we should skip.
|
282
|
+
return report.ignoreExternal && !fullTypeName.startsWith(report.packageName);
|
283
|
+
}
|
284
|
+
_getTypeKnownStatusForSymbolTable(report, scopeName, symbolTable, scopeType, publicSymbolMap, overrideSymbolCallback) {
|
285
|
+
if (this._shouldIgnoreType(report, scopeName)) {
|
286
|
+
return 0 /* Known */;
|
287
|
+
}
|
288
|
+
let knownStatus = 0 /* Known */;
|
289
|
+
symbolTable.forEach((symbol, name) => {
|
290
|
+
if (!(0, symbolNameUtils_1.isPrivateOrProtectedName)(name) &&
|
291
|
+
!symbol.isExternallyHidden() &&
|
292
|
+
!symbol.isPrivateMember() &&
|
293
|
+
!symbol.isPrivatePyTypedImport() &&
|
294
|
+
!symbol.isIgnoredForProtocolMatch() &&
|
295
|
+
!this._isSymbolTypeImplied(scopeType, name)) {
|
296
|
+
const fullName = `${scopeName}.${name}`;
|
297
|
+
// If the symbol was already cached, update its reference count
|
298
|
+
// and skip the rest.
|
299
|
+
const cachedSymbolInfo = report.symbols.get(fullName);
|
300
|
+
if (cachedSymbolInfo) {
|
301
|
+
cachedSymbolInfo.referenceCount++;
|
302
|
+
return;
|
303
|
+
}
|
304
|
+
let symbolType = this._program.getTypeOfSymbol(symbol);
|
305
|
+
let usesAmbiguousOverride = false;
|
306
|
+
let baseSymbolType;
|
307
|
+
let childSymbolType;
|
308
|
+
if (overrideSymbolCallback) {
|
309
|
+
const baseTypeSymbol = overrideSymbolCallback(name, symbol);
|
310
|
+
if (baseTypeSymbol !== symbol) {
|
311
|
+
childSymbolType = symbolType;
|
312
|
+
baseSymbolType = this._program.getTypeOfSymbol(baseTypeSymbol);
|
313
|
+
// If the inferred type is ambiguous or the declared base class type is
|
314
|
+
// not the same type as the inferred type, mark it as ambiguous because
|
315
|
+
// different type checkers will get different results.
|
316
|
+
if (types_1.TypeBase.isAmbiguous(childSymbolType) || !(0, types_1.isTypeSame)(baseSymbolType, childSymbolType)) {
|
317
|
+
// If the base type is known to be a descriptor with a setter,
|
318
|
+
// assume that the child class is simply writing to the base class's setter.
|
319
|
+
if (!(0, typeUtils_1.isDescriptorInstance)(baseSymbolType, /* requireSetter */ true)) {
|
320
|
+
usesAmbiguousOverride = true;
|
321
|
+
}
|
322
|
+
}
|
323
|
+
symbolType = baseSymbolType;
|
324
|
+
}
|
325
|
+
}
|
326
|
+
const typedDecls = symbol.getTypedDeclarations();
|
327
|
+
const primaryDecl = typedDecls.length > 0 ? typedDecls[typedDecls.length - 1] : undefined;
|
328
|
+
let symbolInfo;
|
329
|
+
if ((primaryDecl === null || primaryDecl === void 0 ? void 0 : primaryDecl.type) === 4 /* Class */ && (0, types_1.isInstantiableClass)(symbolType)) {
|
330
|
+
symbolInfo = this._getSymbolForClass(report, symbolType, publicSymbolMap);
|
331
|
+
}
|
332
|
+
else if ((primaryDecl === null || primaryDecl === void 0 ? void 0 : primaryDecl.type) === 6 /* Alias */ && (0, types_1.isModule)(symbolType)) {
|
333
|
+
symbolInfo = this._getSymbolForModule(report, symbolType, publicSymbolMap);
|
334
|
+
}
|
335
|
+
else {
|
336
|
+
const decls = symbol.getDeclarations();
|
337
|
+
const primaryDecl = decls.length > 0 ? decls[decls.length - 1] : undefined;
|
338
|
+
const declRange = (primaryDecl === null || primaryDecl === void 0 ? void 0 : primaryDecl.range) || (0, textRange_1.getEmptyRange)();
|
339
|
+
const declPath = (primaryDecl === null || primaryDecl === void 0 ? void 0 : primaryDecl.path) || '';
|
340
|
+
const symbolCategory = this._getSymbolCategory(symbol, symbolType);
|
341
|
+
const isExported = publicSymbolMap.has(fullName);
|
342
|
+
// If the only reference to this symbol is a "__slots__" entry, we will
|
343
|
+
// skip it when considering type completeness.
|
344
|
+
if (decls.length === 1 &&
|
345
|
+
(primaryDecl === null || primaryDecl === void 0 ? void 0 : primaryDecl.type) === 1 /* Variable */ &&
|
346
|
+
primaryDecl.isDefinedBySlots) {
|
347
|
+
return;
|
348
|
+
}
|
349
|
+
symbolInfo = {
|
350
|
+
category: symbolCategory,
|
351
|
+
name,
|
352
|
+
fullName,
|
353
|
+
filePath: module.path,
|
354
|
+
isExported,
|
355
|
+
typeKnownStatus: 0 /* Known */,
|
356
|
+
referenceCount: 1,
|
357
|
+
diagnostics: [],
|
358
|
+
scopeType,
|
359
|
+
};
|
360
|
+
this._addSymbol(report, symbolInfo);
|
361
|
+
if (!this._isSymbolTypeImplied(scopeType, name)) {
|
362
|
+
this._getSymbolTypeKnownStatus(report, symbolInfo, symbolType, declRange, declPath, publicSymbolMap);
|
363
|
+
}
|
364
|
+
}
|
365
|
+
if (usesAmbiguousOverride) {
|
366
|
+
const decls = symbol.getDeclarations();
|
367
|
+
const primaryDecl = decls.length > 0 ? decls[decls.length - 1] : undefined;
|
368
|
+
const declRange = (primaryDecl === null || primaryDecl === void 0 ? void 0 : primaryDecl.range) || (0, textRange_1.getEmptyRange)();
|
369
|
+
const declPath = (primaryDecl === null || primaryDecl === void 0 ? void 0 : primaryDecl.path) || '';
|
370
|
+
const extraInfo = new diagnostic_1.DiagnosticAddendum();
|
371
|
+
if (baseSymbolType) {
|
372
|
+
extraInfo.addMessage(`Type declared in base class is "${this._program.printType(baseSymbolType,
|
373
|
+
/* expandTypeAlias */ false)}"`);
|
374
|
+
}
|
375
|
+
if (childSymbolType) {
|
376
|
+
extraInfo.addMessage(`Type inferred in child class is "${this._program.printType(childSymbolType,
|
377
|
+
/* expandTypeAlias */ false)}"`);
|
378
|
+
if (types_1.TypeBase.isAmbiguous(childSymbolType)) {
|
379
|
+
extraInfo.addMessage('Inferred child class type is missing type annotation and could be inferred differently by type checkers');
|
380
|
+
}
|
381
|
+
}
|
382
|
+
this._addSymbolError(symbolInfo, `Ambiguous base class override` + extraInfo.getString(), declRange, declPath);
|
383
|
+
symbolInfo.typeKnownStatus = this._updateKnownStatusIfWorse(symbolInfo.typeKnownStatus, 1 /* Ambiguous */);
|
384
|
+
}
|
385
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, symbolInfo.typeKnownStatus);
|
386
|
+
}
|
387
|
+
});
|
388
|
+
return knownStatus;
|
389
|
+
}
|
390
|
+
// Determines whether the type for the symbol in question is fully known.
|
391
|
+
// If not, it adds diagnostics to the symbol information and updates the
|
392
|
+
// typeKnownStatus field.
|
393
|
+
_getSymbolTypeKnownStatus(report, symbolInfo, type, declRange, declFilePath, publicSymbolMap) {
|
394
|
+
let knownStatus = 0 /* Known */;
|
395
|
+
if (type.typeAliasInfo && type.typeAliasInfo.typeArguments) {
|
396
|
+
type.typeAliasInfo.typeArguments.forEach((typeArg, index) => {
|
397
|
+
if ((0, types_1.isUnknown)(typeArg)) {
|
398
|
+
this._addSymbolError(symbolInfo, `Type argument ${index + 1} for type alias "${type.typeAliasInfo.name}" has unknown type`, declRange, declFilePath);
|
399
|
+
knownStatus = 3 /* Unknown */;
|
400
|
+
}
|
401
|
+
else if ((0, typeUtils_1.isPartlyUnknown)(typeArg)) {
|
402
|
+
this._addSymbolError(symbolInfo, `Type argument ${index + 1} for type alias "${type.typeAliasInfo.name}" has partially unknown type`, declRange, declFilePath);
|
403
|
+
knownStatus = 2 /* PartiallyUnknown */;
|
404
|
+
}
|
405
|
+
});
|
406
|
+
}
|
407
|
+
if (types_1.TypeBase.isAmbiguous(type) && !(0, types_1.isUnknown)(type)) {
|
408
|
+
const ambiguousDiag = new diagnostic_1.DiagnosticAddendum();
|
409
|
+
ambiguousDiag.addMessage(`Inferred type is "${this._program.printType(type, /* expandTypeAlias */ false)}"`);
|
410
|
+
this._addSymbolError(symbolInfo, 'Type is missing type annotation and could be inferred differently by type checkers' +
|
411
|
+
ambiguousDiag.getString(), declRange, declFilePath);
|
412
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 1 /* Ambiguous */);
|
413
|
+
}
|
414
|
+
switch (type.category) {
|
415
|
+
case 0 /* Unbound */:
|
416
|
+
case 2 /* Any */:
|
417
|
+
case 3 /* None */:
|
418
|
+
case 4 /* Never */:
|
419
|
+
case 10 /* TypeVar */:
|
420
|
+
break;
|
421
|
+
case 1 /* Unknown */: {
|
422
|
+
this._addSymbolError(symbolInfo, `Type unknown for ${PackageTypeVerifier.getSymbolCategoryString(symbolInfo.category)} "${symbolInfo.fullName}"`, declRange, declFilePath);
|
423
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 3 /* Unknown */);
|
424
|
+
break;
|
425
|
+
}
|
426
|
+
case 9 /* Union */: {
|
427
|
+
(0, typeUtils_1.doForEachSubtype)(type, (subtype) => {
|
428
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, this._getSymbolTypeKnownStatus(report, symbolInfo, subtype, declRange, declFilePath, publicSymbolMap));
|
429
|
+
});
|
430
|
+
break;
|
431
|
+
}
|
432
|
+
case 6 /* OverloadedFunction */: {
|
433
|
+
for (const overload of type.overloads) {
|
434
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, this._getSymbolTypeKnownStatus(report, symbolInfo, overload, declRange, declFilePath, publicSymbolMap));
|
435
|
+
}
|
436
|
+
break;
|
437
|
+
}
|
438
|
+
case 5 /* Function */: {
|
439
|
+
if (!this._shouldIgnoreType(report, type.details.fullName)) {
|
440
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, this._getFunctionTypeKnownStatus(report, type, publicSymbolMap, symbolInfo, declRange, declFilePath));
|
441
|
+
}
|
442
|
+
break;
|
443
|
+
}
|
444
|
+
case 7 /* Class */: {
|
445
|
+
// Properties require special handling.
|
446
|
+
if (types_1.TypeBase.isInstance(type) && types_1.ClassType.isPropertyClass(type)) {
|
447
|
+
const accessors = ['fget', 'fset', 'fdel'];
|
448
|
+
const propertyClass = type;
|
449
|
+
accessors.forEach((accessorName) => {
|
450
|
+
const accessSymbol = propertyClass.details.fields.get(accessorName);
|
451
|
+
let accessType = accessSymbol ? this._program.getTypeOfSymbol(accessSymbol) : undefined;
|
452
|
+
if (!accessType) {
|
453
|
+
return;
|
454
|
+
}
|
455
|
+
if ((0, types_1.isFunction)(accessType)) {
|
456
|
+
// The processing for fget, fset and fdel mark the methods as "static" so they
|
457
|
+
// work properly when accessed directly from the property object. We need
|
458
|
+
// to remove this flag here so the method is seen as an instance method rather than
|
459
|
+
// static. Otherwise we'll incorrectly report that "self" is not annotated.
|
460
|
+
accessType = types_1.FunctionType.cloneWithNewFlags(accessType, accessType.details.flags & ~4 /* StaticMethod */);
|
461
|
+
}
|
462
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, this._getSymbolTypeKnownStatus(report, symbolInfo, accessType, (0, textRange_1.getEmptyRange)(), '', publicSymbolMap));
|
463
|
+
});
|
464
|
+
break;
|
465
|
+
}
|
466
|
+
if (!this._shouldIgnoreType(report, type.details.fullName)) {
|
467
|
+
// Don't bother type-checking built-in types.
|
468
|
+
if (!types_1.ClassType.isBuiltIn(type)) {
|
469
|
+
// Reference the class.
|
470
|
+
this._getSymbolForClass(report, type, publicSymbolMap);
|
471
|
+
}
|
472
|
+
}
|
473
|
+
// Analyze type arguments if present to make sure they are known.
|
474
|
+
if (type.typeArguments) {
|
475
|
+
type.typeArguments.forEach((typeArg, index) => {
|
476
|
+
if ((0, types_1.isUnknown)(typeArg)) {
|
477
|
+
this._addSymbolError(symbolInfo, `Type argument ${index + 1} for class "${type.details.name}" has unknown type`, declRange, declFilePath);
|
478
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 3 /* Unknown */);
|
479
|
+
}
|
480
|
+
else if ((0, typeUtils_1.isPartlyUnknown)(typeArg)) {
|
481
|
+
const diag = new diagnostic_1.DiagnosticAddendum();
|
482
|
+
diag.addMessage(`Type is ${this._program.printType(typeArg, /* expandTypeAlias */ false)}`);
|
483
|
+
this._addSymbolError(symbolInfo, `Type argument ${index + 1} for class "${type.details.name}" has partially unknown type` + diag.getString(), declRange, declFilePath);
|
484
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 2 /* PartiallyUnknown */);
|
485
|
+
}
|
486
|
+
});
|
487
|
+
}
|
488
|
+
break;
|
489
|
+
}
|
490
|
+
case 8 /* Module */: {
|
491
|
+
if (!this._shouldIgnoreType(report, type.moduleName)) {
|
492
|
+
const moduleSymbol = this._getSymbolForModule(report, type, publicSymbolMap);
|
493
|
+
if (moduleSymbol.typeKnownStatus !== 0 /* Known */) {
|
494
|
+
this._addSymbolError(symbolInfo, `Module "${moduleSymbol.fullName}" is partially unknown`, declRange, declFilePath);
|
495
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, moduleSymbol.typeKnownStatus);
|
496
|
+
}
|
497
|
+
}
|
498
|
+
break;
|
499
|
+
}
|
500
|
+
}
|
501
|
+
// Downgrade the symbol's type known status info.
|
502
|
+
symbolInfo.typeKnownStatus = this._updateKnownStatusIfWorse(symbolInfo.typeKnownStatus, knownStatus);
|
503
|
+
return knownStatus;
|
504
|
+
}
|
505
|
+
_getFunctionTypeKnownStatus(report, type, publicSymbolMap, symbolInfo, declRange, declFilePath, diag) {
|
506
|
+
let knownStatus = 0 /* Known */;
|
507
|
+
// If the file path wasn't provided, try to get it from the type.
|
508
|
+
if (type.details.declaration && !declFilePath) {
|
509
|
+
declFilePath = type.details.declaration.path;
|
510
|
+
}
|
511
|
+
type.details.parameters.forEach((param, index) => {
|
512
|
+
// Skip nameless parameters like "*" and "/".
|
513
|
+
if (param.name) {
|
514
|
+
if (!param.hasDeclaredType) {
|
515
|
+
// Allow params (like "self" and "cls") to skip declarations because
|
516
|
+
// we're able to synthesize these.
|
517
|
+
const isSynthesized = index === 0 &&
|
518
|
+
(symbolInfo === null || symbolInfo === void 0 ? void 0 : symbolInfo.scopeType) === 2 /* Class */ &&
|
519
|
+
(types_1.FunctionType.isClassMethod(type) ||
|
520
|
+
types_1.FunctionType.isInstanceMethod(type) ||
|
521
|
+
types_1.FunctionType.isConstructorMethod(type));
|
522
|
+
if (!isSynthesized) {
|
523
|
+
if (symbolInfo) {
|
524
|
+
this._addSymbolError(symbolInfo, `Type annotation for parameter "${param.name}" is missing`, declRange || (0, textRange_1.getEmptyRange)(), declFilePath || '');
|
525
|
+
}
|
526
|
+
diag === null || diag === void 0 ? void 0 : diag.createAddendum().addMessage(`Type annotation for parameter "${param.name}" is missing`);
|
527
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 3 /* Unknown */);
|
528
|
+
}
|
529
|
+
}
|
530
|
+
else if ((0, types_1.isUnknown)(param.type)) {
|
531
|
+
if (symbolInfo) {
|
532
|
+
this._addSymbolError(symbolInfo, `Type of parameter "${param.name}" is unknown`, declRange || (0, textRange_1.getEmptyRange)(), declFilePath || '');
|
533
|
+
diag === null || diag === void 0 ? void 0 : diag.createAddendum().addMessage(`Type of parameter "${param.name}" is unknown`);
|
534
|
+
}
|
535
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 3 /* Unknown */);
|
536
|
+
}
|
537
|
+
else {
|
538
|
+
const extraInfo = new diagnostic_1.DiagnosticAddendum();
|
539
|
+
const paramKnownStatus = this._getTypeKnownStatus(report, param.type, publicSymbolMap, extraInfo.createAddendum());
|
540
|
+
if (paramKnownStatus !== 0 /* Known */) {
|
541
|
+
extraInfo.addMessage(`Parameter type is "${this._program.printType(param.type, /* expandTypeAlias */ false)}"`);
|
542
|
+
if (symbolInfo) {
|
543
|
+
this._addSymbolError(symbolInfo, `Type of parameter "${param.name}" is partially unknown` + extraInfo.getString(), declRange || (0, textRange_1.getEmptyRange)(), declFilePath || '');
|
544
|
+
}
|
545
|
+
if (diag) {
|
546
|
+
const subDiag = diag.createAddendum();
|
547
|
+
subDiag.addMessage(`Type of parameter "${param.name}" is partially unknown`);
|
548
|
+
subDiag.addAddendum(extraInfo);
|
549
|
+
}
|
550
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, paramKnownStatus);
|
551
|
+
}
|
552
|
+
}
|
553
|
+
}
|
554
|
+
});
|
555
|
+
if (type.details.declaredReturnType) {
|
556
|
+
if ((0, types_1.isUnknown)(type.details.declaredReturnType)) {
|
557
|
+
if (symbolInfo) {
|
558
|
+
this._addSymbolError(symbolInfo, `Return type is unknown`, declRange || (0, textRange_1.getEmptyRange)(), declFilePath || '');
|
559
|
+
}
|
560
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 3 /* Unknown */);
|
561
|
+
}
|
562
|
+
else {
|
563
|
+
const extraInfo = new diagnostic_1.DiagnosticAddendum();
|
564
|
+
const returnTypeKnownStatus = this._getTypeKnownStatus(report, type.details.declaredReturnType, publicSymbolMap, extraInfo.createAddendum());
|
565
|
+
if (returnTypeKnownStatus !== 0 /* Known */) {
|
566
|
+
extraInfo.addMessage(`Return type is "${this._program.printType(type.details.declaredReturnType,
|
567
|
+
/* expandTypeAlias */ false)}"`);
|
568
|
+
if (symbolInfo) {
|
569
|
+
this._addSymbolError(symbolInfo, `Return type is partially unknown` + extraInfo.getString(), declRange || (0, textRange_1.getEmptyRange)(), declFilePath || '');
|
570
|
+
}
|
571
|
+
if (diag) {
|
572
|
+
const subDiag = diag.createAddendum();
|
573
|
+
subDiag.addMessage(`Return type is partially unknown`);
|
574
|
+
subDiag.addAddendum(extraInfo);
|
575
|
+
}
|
576
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, returnTypeKnownStatus);
|
577
|
+
}
|
578
|
+
}
|
579
|
+
}
|
580
|
+
else {
|
581
|
+
// Init methods have an implied return type.
|
582
|
+
if (type.details.name !== '__init__') {
|
583
|
+
if (symbolInfo) {
|
584
|
+
this._addSymbolError(symbolInfo, `Return type annotation is missing`, declRange || (0, textRange_1.getEmptyRange)(), declFilePath || '');
|
585
|
+
}
|
586
|
+
diag === null || diag === void 0 ? void 0 : diag.createAddendum().addMessage(`Return type annotation is missing`);
|
587
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 3 /* Unknown */);
|
588
|
+
}
|
589
|
+
}
|
590
|
+
if (!type.details.docString) {
|
591
|
+
// Don't require docstrings for dunder methods.
|
592
|
+
if ((symbolInfo === null || symbolInfo === void 0 ? void 0 : symbolInfo.isExported) && !(0, symbolNameUtils_1.isDunderName)(symbolInfo.name)) {
|
593
|
+
if (symbolInfo) {
|
594
|
+
this._addSymbolWarning(symbolInfo, `No docstring found for function "${symbolInfo.fullName}"`, declRange || (0, textRange_1.getEmptyRange)(), declFilePath || '');
|
595
|
+
}
|
596
|
+
report.missingFunctionDocStringCount++;
|
597
|
+
}
|
598
|
+
}
|
599
|
+
if (type.details.parameters.find((param) => param.defaultType && (0, typeUtils_1.isEllipsisType)(param.defaultType))) {
|
600
|
+
if (symbolInfo) {
|
601
|
+
this._addSymbolWarning(symbolInfo, `One or more default values in function "${symbolInfo.fullName}" is specified as "..."`, declRange || (0, textRange_1.getEmptyRange)(), declFilePath || '');
|
602
|
+
}
|
603
|
+
report.missingDefaultParamCount++;
|
604
|
+
}
|
605
|
+
if (symbolInfo) {
|
606
|
+
symbolInfo.typeKnownStatus = this._updateKnownStatusIfWorse(symbolInfo.typeKnownStatus, knownStatus);
|
607
|
+
}
|
608
|
+
return knownStatus;
|
609
|
+
}
|
610
|
+
_getSymbolForClass(report, type, publicSymbolMap) {
|
611
|
+
// See if this type is already analyzed.
|
612
|
+
const cachedType = report.symbols.get(type.details.fullName);
|
613
|
+
if (cachedType) {
|
614
|
+
cachedType.referenceCount++;
|
615
|
+
return cachedType;
|
616
|
+
}
|
617
|
+
const symbolInfo = {
|
618
|
+
category: packageTypeReport_1.SymbolCategory.Class,
|
619
|
+
name: type.details.name,
|
620
|
+
fullName: type.details.fullName,
|
621
|
+
filePath: type.details.filePath,
|
622
|
+
isExported: publicSymbolMap.has(type.details.fullName),
|
623
|
+
typeKnownStatus: 0 /* Known */,
|
624
|
+
referenceCount: 1,
|
625
|
+
diagnostics: [],
|
626
|
+
scopeType: 2 /* Class */,
|
627
|
+
};
|
628
|
+
this._addSymbol(report, symbolInfo);
|
629
|
+
// Determine whether the class has a proper doc string.
|
630
|
+
if (symbolInfo.isExported && !type.details.docString) {
|
631
|
+
this._addSymbolWarning(symbolInfo, `No docstring found for class "${type.details.fullName}"`, (0, textRange_1.getEmptyRange)(), '');
|
632
|
+
report.missingClassDocStringCount++;
|
633
|
+
}
|
634
|
+
const symbolTableTypeKnownStatus = this._getTypeKnownStatusForSymbolTable(report, type.details.fullName, type.details.fields, 2 /* Class */, publicSymbolMap, (name, symbol) => {
|
635
|
+
// If the symbol within this class is lacking a type declaration,
|
636
|
+
// see if we can find a same-named symbol in a parent class with
|
637
|
+
// a type declaration.
|
638
|
+
if (!symbol.hasTypedDeclarations()) {
|
639
|
+
for (const mroClass of type.details.mro.slice(1)) {
|
640
|
+
if ((0, types_1.isClass)(mroClass)) {
|
641
|
+
const overrideSymbol = mroClass.details.fields.get(name);
|
642
|
+
if (overrideSymbol && overrideSymbol.hasTypedDeclarations()) {
|
643
|
+
return overrideSymbol;
|
644
|
+
}
|
645
|
+
}
|
646
|
+
}
|
647
|
+
}
|
648
|
+
return symbol;
|
649
|
+
});
|
650
|
+
symbolInfo.typeKnownStatus = this._updateKnownStatusIfWorse(symbolInfo.typeKnownStatus, symbolTableTypeKnownStatus);
|
651
|
+
// Add information for the metaclass.
|
652
|
+
if (type.details.effectiveMetaclass) {
|
653
|
+
if (!(0, types_1.isInstantiableClass)(type.details.effectiveMetaclass)) {
|
654
|
+
this._addSymbolError(symbolInfo, `Type of metaclass unknown`, (0, textRange_1.getEmptyRange)(), '');
|
655
|
+
symbolInfo.typeKnownStatus = this._updateKnownStatusIfWorse(symbolInfo.typeKnownStatus, 2 /* PartiallyUnknown */);
|
656
|
+
}
|
657
|
+
else {
|
658
|
+
const diag = new diagnostic_1.DiagnosticAddendum();
|
659
|
+
const metaclassKnownStatus = this._getTypeKnownStatus(report, type.details.effectiveMetaclass, publicSymbolMap, diag);
|
660
|
+
if (metaclassKnownStatus !== 0 /* Known */) {
|
661
|
+
this._addSymbolError(symbolInfo, `Type of metaclass "${type.details.effectiveMetaclass}" is partially unknown` +
|
662
|
+
diag.getString(), (0, textRange_1.getEmptyRange)(), '');
|
663
|
+
symbolInfo.typeKnownStatus = this._updateKnownStatusIfWorse(symbolInfo.typeKnownStatus, metaclassKnownStatus);
|
664
|
+
}
|
665
|
+
}
|
666
|
+
}
|
667
|
+
// Add information for base classes.
|
668
|
+
type.details.baseClasses.forEach((baseClass) => {
|
669
|
+
if (!(0, types_1.isInstantiableClass)(baseClass)) {
|
670
|
+
this._addSymbolError(symbolInfo, `Type of base class unknown`, (0, textRange_1.getEmptyRange)(), '');
|
671
|
+
symbolInfo.typeKnownStatus = this._updateKnownStatusIfWorse(symbolInfo.typeKnownStatus, 2 /* PartiallyUnknown */);
|
672
|
+
}
|
673
|
+
else {
|
674
|
+
// Handle "tuple" specially. Even though it's a generic class, it
|
675
|
+
// doesn't require a type argument.
|
676
|
+
if (types_1.ClassType.isBuiltIn(baseClass, 'tuple')) {
|
677
|
+
return;
|
678
|
+
}
|
679
|
+
const diag = new diagnostic_1.DiagnosticAddendum();
|
680
|
+
const baseClassTypeStatus = this._getTypeKnownStatus(report, baseClass, publicSymbolMap, diag);
|
681
|
+
if (baseClassTypeStatus !== 0 /* Known */) {
|
682
|
+
this._addSymbolError(symbolInfo, `Type of base class "${baseClass.details.fullName}" is partially unknown` + diag.getString(), (0, textRange_1.getEmptyRange)(), '');
|
683
|
+
symbolInfo.typeKnownStatus = this._updateKnownStatusIfWorse(symbolInfo.typeKnownStatus, baseClassTypeStatus);
|
684
|
+
}
|
685
|
+
}
|
686
|
+
});
|
687
|
+
return symbolInfo;
|
688
|
+
}
|
689
|
+
_getSymbolForModule(report, type, publicSymbolMap) {
|
690
|
+
// See if this type is already analyzed.
|
691
|
+
const cachedType = report.symbols.get(type.moduleName);
|
692
|
+
if (cachedType) {
|
693
|
+
cachedType.referenceCount++;
|
694
|
+
return cachedType;
|
695
|
+
}
|
696
|
+
const symbolInfo = {
|
697
|
+
category: packageTypeReport_1.SymbolCategory.Module,
|
698
|
+
name: type.moduleName,
|
699
|
+
fullName: type.moduleName,
|
700
|
+
filePath: type.filePath,
|
701
|
+
isExported: publicSymbolMap.has(type.moduleName),
|
702
|
+
typeKnownStatus: 0 /* Known */,
|
703
|
+
referenceCount: 1,
|
704
|
+
diagnostics: [],
|
705
|
+
scopeType: 3 /* Module */,
|
706
|
+
};
|
707
|
+
this._addSymbol(report, symbolInfo);
|
708
|
+
const symbolTableTypeKnownStatus = this._getTypeKnownStatusForSymbolTable(report, type.moduleName, type.fields, 3 /* Module */, publicSymbolMap);
|
709
|
+
symbolInfo.typeKnownStatus = this._updateKnownStatusIfWorse(symbolInfo.typeKnownStatus, symbolTableTypeKnownStatus);
|
710
|
+
return symbolInfo;
|
711
|
+
}
|
712
|
+
_getTypeKnownStatus(report, type, publicSymbolMap, diag) {
|
713
|
+
let knownStatus = 0 /* Known */;
|
714
|
+
if (type.typeAliasInfo && type.typeAliasInfo.typeArguments) {
|
715
|
+
type.typeAliasInfo.typeArguments.forEach((typeArg, index) => {
|
716
|
+
if ((0, types_1.isUnknown)(typeArg)) {
|
717
|
+
diag.addMessage(`Type argument ${index + 1} for type alias "${type.typeAliasInfo.name}" has unknown type`);
|
718
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 3 /* Unknown */);
|
719
|
+
}
|
720
|
+
else if ((0, typeUtils_1.isPartlyUnknown)(typeArg)) {
|
721
|
+
diag.addMessage(`Type argument ${index + 1} for type alias "${type.typeAliasInfo.name}" has partially unknown type`);
|
722
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 2 /* PartiallyUnknown */);
|
723
|
+
}
|
724
|
+
});
|
725
|
+
}
|
726
|
+
if (types_1.TypeBase.isAmbiguous(type)) {
|
727
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 1 /* Ambiguous */);
|
728
|
+
}
|
729
|
+
switch (type.category) {
|
730
|
+
case 0 /* Unbound */:
|
731
|
+
case 2 /* Any */:
|
732
|
+
case 3 /* None */:
|
733
|
+
case 4 /* Never */:
|
734
|
+
case 10 /* TypeVar */:
|
735
|
+
break;
|
736
|
+
case 1 /* Unknown */: {
|
737
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 3 /* Unknown */);
|
738
|
+
break;
|
739
|
+
}
|
740
|
+
case 9 /* Union */: {
|
741
|
+
(0, typeUtils_1.doForEachSubtype)(type, (subtype) => {
|
742
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, this._getTypeKnownStatus(report, subtype, publicSymbolMap, diag.createAddendum()));
|
743
|
+
});
|
744
|
+
break;
|
745
|
+
}
|
746
|
+
case 6 /* OverloadedFunction */: {
|
747
|
+
for (const overload of type.overloads) {
|
748
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, this._getTypeKnownStatus(report, overload, publicSymbolMap, diag.createAddendum()));
|
749
|
+
}
|
750
|
+
break;
|
751
|
+
}
|
752
|
+
case 5 /* Function */: {
|
753
|
+
if (!this._shouldIgnoreType(report, type.details.fullName)) {
|
754
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, this._getFunctionTypeKnownStatus(report, type, publicSymbolMap,
|
755
|
+
/* symbolInfo */ undefined,
|
756
|
+
/* declRange */ undefined,
|
757
|
+
/* declFilePath */ undefined, diag));
|
758
|
+
}
|
759
|
+
break;
|
760
|
+
}
|
761
|
+
case 7 /* Class */: {
|
762
|
+
if (!this._shouldIgnoreType(report, type.details.fullName)) {
|
763
|
+
// Don't bother type-checking built-in types.
|
764
|
+
if (!types_1.ClassType.isBuiltIn(type)) {
|
765
|
+
// Reference the class.
|
766
|
+
this._getSymbolForClass(report, type, publicSymbolMap);
|
767
|
+
}
|
768
|
+
}
|
769
|
+
// Analyze type arguments if present to make sure they are known.
|
770
|
+
if (type.typeArguments) {
|
771
|
+
type.typeArguments.forEach((typeArg, index) => {
|
772
|
+
if ((0, types_1.isUnknown)(typeArg)) {
|
773
|
+
diag.addMessage(`Type argument ${index + 1} for class "${type.details.name}" has unknown type`);
|
774
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 3 /* Unknown */);
|
775
|
+
}
|
776
|
+
else if ((0, typeUtils_1.isPartlyUnknown)(typeArg)) {
|
777
|
+
diag.addMessage(`Type argument ${index + 1} for class "${type.details.name}" has partially unknown type`);
|
778
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, 2 /* PartiallyUnknown */);
|
779
|
+
}
|
780
|
+
});
|
781
|
+
}
|
782
|
+
break;
|
783
|
+
}
|
784
|
+
case 8 /* Module */: {
|
785
|
+
if (!this._shouldIgnoreType(report, type.moduleName)) {
|
786
|
+
const moduleSymbol = this._getSymbolForModule(report, type, publicSymbolMap);
|
787
|
+
knownStatus = this._updateKnownStatusIfWorse(knownStatus, moduleSymbol.typeKnownStatus);
|
788
|
+
}
|
789
|
+
break;
|
790
|
+
}
|
791
|
+
}
|
792
|
+
return knownStatus;
|
793
|
+
}
|
794
|
+
_getSymbolCategory(symbol, type) {
|
795
|
+
if (type.typeAliasInfo) {
|
796
|
+
return packageTypeReport_1.SymbolCategory.TypeAlias;
|
797
|
+
}
|
798
|
+
switch (type.category) {
|
799
|
+
case 5 /* Function */:
|
800
|
+
case 6 /* OverloadedFunction */: {
|
801
|
+
const funcDecl = symbol
|
802
|
+
.getDeclarations()
|
803
|
+
.find((decl) => decl.type === 3 /* Function */);
|
804
|
+
if (funcDecl && funcDecl.isMethod) {
|
805
|
+
return packageTypeReport_1.SymbolCategory.Method;
|
806
|
+
}
|
807
|
+
return packageTypeReport_1.SymbolCategory.Function;
|
808
|
+
}
|
809
|
+
case 7 /* Class */: {
|
810
|
+
if (types_1.TypeBase.isInstantiable(type)) {
|
811
|
+
return packageTypeReport_1.SymbolCategory.Class;
|
812
|
+
}
|
813
|
+
const varDecl = symbol
|
814
|
+
.getDeclarations()
|
815
|
+
.find((decl) => decl.type === 1 /* Variable */);
|
816
|
+
if (varDecl && (varDecl.isConstant || varDecl.isFinal)) {
|
817
|
+
return packageTypeReport_1.SymbolCategory.Constant;
|
818
|
+
}
|
819
|
+
return packageTypeReport_1.SymbolCategory.Variable;
|
820
|
+
}
|
821
|
+
case 8 /* Module */: {
|
822
|
+
return packageTypeReport_1.SymbolCategory.Module;
|
823
|
+
}
|
824
|
+
case 10 /* TypeVar */: {
|
825
|
+
return packageTypeReport_1.SymbolCategory.TypeVar;
|
826
|
+
}
|
827
|
+
default: {
|
828
|
+
const varDecl = symbol
|
829
|
+
.getDeclarations()
|
830
|
+
.find((decl) => decl.type === 1 /* Variable */);
|
831
|
+
if (varDecl) {
|
832
|
+
if (varDecl.isConstant || varDecl.isFinal) {
|
833
|
+
return packageTypeReport_1.SymbolCategory.Constant;
|
834
|
+
}
|
835
|
+
else {
|
836
|
+
return packageTypeReport_1.SymbolCategory.Variable;
|
837
|
+
}
|
838
|
+
}
|
839
|
+
return packageTypeReport_1.SymbolCategory.Indeterminate;
|
840
|
+
}
|
841
|
+
}
|
842
|
+
}
|
843
|
+
_getDirectoryForModule(moduleName) {
|
844
|
+
var _a;
|
845
|
+
const importResult = this._importResolver.resolveImport('', this._execEnv, (0, importResolver_1.createImportedModuleDescriptor)(moduleName));
|
846
|
+
if (importResult.isImportFound) {
|
847
|
+
const resolvedPath = importResult.resolvedPaths[importResult.resolvedPaths.length - 1];
|
848
|
+
if (resolvedPath) {
|
849
|
+
return (0, pathUtils_1.getDirectoryPath)(resolvedPath);
|
850
|
+
}
|
851
|
+
// If it's a namespace package with no __init__.py(i), use the package
|
852
|
+
// directory instead.
|
853
|
+
return (_a = importResult.packageDirectory) !== null && _a !== void 0 ? _a : '';
|
854
|
+
}
|
855
|
+
return undefined;
|
856
|
+
}
|
857
|
+
_isSymbolTypeImplied(scopeType, name) {
|
858
|
+
if (scopeType === 2 /* Class */) {
|
859
|
+
const knownClassSymbols = [
|
860
|
+
'__class__',
|
861
|
+
'__dict__',
|
862
|
+
'__doc__',
|
863
|
+
'__module__',
|
864
|
+
'__qualname__',
|
865
|
+
'__slots__',
|
866
|
+
'__all__',
|
867
|
+
'__weakref__',
|
868
|
+
];
|
869
|
+
return knownClassSymbols.some((sym) => sym === name);
|
870
|
+
}
|
871
|
+
else if (scopeType === 3 /* Module */) {
|
872
|
+
const knownModuleSymbols = [
|
873
|
+
'__all__',
|
874
|
+
'__author__',
|
875
|
+
'__copyright__',
|
876
|
+
'__email__',
|
877
|
+
'__license__',
|
878
|
+
'__title__',
|
879
|
+
'__uri__',
|
880
|
+
'__version__',
|
881
|
+
];
|
882
|
+
return knownModuleSymbols.some((sym) => sym === name);
|
883
|
+
}
|
884
|
+
return false;
|
885
|
+
}
|
886
|
+
_addSymbol(report, symbolInfo) {
|
887
|
+
(0, debug_1.assert)(!report.symbols.has(symbolInfo.fullName));
|
888
|
+
report.symbols.set(symbolInfo.fullName, symbolInfo);
|
889
|
+
}
|
890
|
+
_addSymbolError(symbolInfo, message, declRange, declFilePath) {
|
891
|
+
symbolInfo.diagnostics.push({
|
892
|
+
diagnostic: new diagnostic_1.Diagnostic(0 /* Error */, message, declRange),
|
893
|
+
filePath: declFilePath,
|
894
|
+
});
|
895
|
+
}
|
896
|
+
_addSymbolWarning(symbolInfo, message, declRange, declFilePath) {
|
897
|
+
symbolInfo.diagnostics.push({
|
898
|
+
diagnostic: new diagnostic_1.Diagnostic(1 /* Warning */, message, declRange),
|
899
|
+
filePath: declFilePath,
|
900
|
+
});
|
901
|
+
}
|
902
|
+
_updateKnownStatusIfWorse(currentStatus, newStatus) {
|
903
|
+
// Is the current status worse than the current status.
|
904
|
+
return newStatus > currentStatus ? newStatus : currentStatus;
|
905
|
+
}
|
906
|
+
}
|
907
|
+
exports.PackageTypeVerifier = PackageTypeVerifier;
|
908
|
+
//# sourceMappingURL=packageTypeVerifier.js.map
|