@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,923 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* languageServerBase.ts
|
4
|
+
* Copyright (c) Microsoft Corporation.
|
5
|
+
* Licensed under the MIT license.
|
6
|
+
*
|
7
|
+
* Implements common language server functionality.
|
8
|
+
* This is split out as a base class to allow for
|
9
|
+
* different language server variants to be created
|
10
|
+
* from the same core functionality.
|
11
|
+
*/
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
+
exports.LanguageServerBase = void 0;
|
14
|
+
require("./common/extensions");
|
15
|
+
const vscode_languageserver_1 = require("vscode-languageserver");
|
16
|
+
const progress_1 = require("vscode-languageserver/lib/common/progress");
|
17
|
+
const backgroundAnalysisProgram_1 = require("./analyzer/backgroundAnalysisProgram");
|
18
|
+
const service_1 = require("./analyzer/service");
|
19
|
+
const commandResult_1 = require("./commands/commandResult");
|
20
|
+
const cancellationUtils_1 = require("./common/cancellationUtils");
|
21
|
+
const collectionUtils_1 = require("./common/collectionUtils");
|
22
|
+
const commandLineOptions_1 = require("./common/commandLineOptions");
|
23
|
+
const configOptions_1 = require("./common/configOptions");
|
24
|
+
const console_1 = require("./common/console");
|
25
|
+
const deferred_1 = require("./common/deferred");
|
26
|
+
const lspUtils_1 = require("./common/lspUtils");
|
27
|
+
const pathUtils_1 = require("./common/pathUtils");
|
28
|
+
const progressReporter_1 = require("./common/progressReporter");
|
29
|
+
const uriParser_1 = require("./common/uriParser");
|
30
|
+
const workspaceEditUtils_1 = require("./common/workspaceEditUtils");
|
31
|
+
const analyzerServiceExecutor_1 = require("./languageService/analyzerServiceExecutor");
|
32
|
+
const definitionProvider_1 = require("./languageService/definitionProvider");
|
33
|
+
const documentSymbolProvider_1 = require("./languageService/documentSymbolProvider");
|
34
|
+
const hoverProvider_1 = require("./languageService/hoverProvider");
|
35
|
+
const localize_1 = require("./localization/localize");
|
36
|
+
const pyrightFileSystem_1 = require("./pyrightFileSystem");
|
37
|
+
const nullProgressReporter = (0, progress_1.attachWorkDone)(undefined, /* params */ undefined);
|
38
|
+
class LanguageServerBase {
|
39
|
+
constructor(_serverOptions, _connection, console, uriParserFactory = (fs) => new uriParser_1.UriParser(fs)) {
|
40
|
+
var _a, _b;
|
41
|
+
this._serverOptions = _serverOptions;
|
42
|
+
this._connection = _connection;
|
43
|
+
this.console = console;
|
44
|
+
this._lastTriggerKind = vscode_languageserver_1.CompletionTriggerKind.Invoked;
|
45
|
+
// Global root path - the basis for all global settings.
|
46
|
+
this.rootPath = '';
|
47
|
+
this.client = {
|
48
|
+
hasConfigurationCapability: false,
|
49
|
+
hasVisualStudioExtensionsCapability: false,
|
50
|
+
hasWorkspaceFoldersCapability: false,
|
51
|
+
hasWatchFileCapability: false,
|
52
|
+
hasWatchFileRelativePathCapability: false,
|
53
|
+
hasActiveParameterCapability: false,
|
54
|
+
hasSignatureLabelOffsetCapability: false,
|
55
|
+
hasHierarchicalDocumentSymbolCapability: false,
|
56
|
+
hasWindowProgressCapability: false,
|
57
|
+
hasGoToDeclarationCapability: false,
|
58
|
+
hasDocumentChangeCapability: false,
|
59
|
+
hasDocumentAnnotationCapability: false,
|
60
|
+
hoverContentFormat: vscode_languageserver_1.MarkupKind.PlainText,
|
61
|
+
completionDocFormat: vscode_languageserver_1.MarkupKind.PlainText,
|
62
|
+
completionSupportsSnippet: false,
|
63
|
+
signatureDocFormat: vscode_languageserver_1.MarkupKind.PlainText,
|
64
|
+
supportsDeprecatedDiagnosticTag: false,
|
65
|
+
supportsUnnecessaryDiagnosticTag: false,
|
66
|
+
completionItemResolveSupportsAdditionalTextEdits: false,
|
67
|
+
};
|
68
|
+
// Stash the base directory into a global variable.
|
69
|
+
// This must happen before fs.getModulePath().
|
70
|
+
global.__rootDirectory = _serverOptions.rootDirectory;
|
71
|
+
this.console.info(`${_serverOptions.productName} language server ${_serverOptions.version && _serverOptions.version + ' '}starting`);
|
72
|
+
this.console.info(`Server root directory: ${_serverOptions.rootDirectory}`);
|
73
|
+
this._workspaceMap = this._serverOptions.workspaceMap;
|
74
|
+
this._fileWatcherProvider = this._serverOptions.fileWatcherProvider;
|
75
|
+
this.fs = new pyrightFileSystem_1.PyrightFileSystem(this._serverOptions.fileSystem);
|
76
|
+
this._uriParser = uriParserFactory(this.fs);
|
77
|
+
// Set the working directory to a known location within
|
78
|
+
// the extension directory. Otherwise the execution of
|
79
|
+
// python can have unintended and surprising results.
|
80
|
+
const moduleDirectory = this.fs.getModulePath();
|
81
|
+
if (moduleDirectory) {
|
82
|
+
this.fs.chdir(moduleDirectory);
|
83
|
+
}
|
84
|
+
// Set up callbacks.
|
85
|
+
this.setupConnection((_a = _serverOptions.supportedCommands) !== null && _a !== void 0 ? _a : [], (_b = _serverOptions.supportedCodeActions) !== null && _b !== void 0 ? _b : []);
|
86
|
+
this._progressReporter = new progressReporter_1.ProgressReportTracker(this.createProgressReporter());
|
87
|
+
// Listen on the connection.
|
88
|
+
this._connection.listen();
|
89
|
+
}
|
90
|
+
// Convert uri to path
|
91
|
+
decodeTextDocumentUri(uriString) {
|
92
|
+
return this._uriParser.decodeTextDocumentUri(uriString);
|
93
|
+
}
|
94
|
+
async getConfiguration(scopeUri, section) {
|
95
|
+
if (this.client.hasConfigurationCapability) {
|
96
|
+
const item = {};
|
97
|
+
if (scopeUri !== undefined) {
|
98
|
+
item.scopeUri = scopeUri;
|
99
|
+
}
|
100
|
+
if (section !== undefined) {
|
101
|
+
item.section = section;
|
102
|
+
}
|
103
|
+
return this._connection.workspace.getConfiguration(item);
|
104
|
+
}
|
105
|
+
if (this._defaultClientConfig) {
|
106
|
+
return (0, collectionUtils_1.getNestedProperty)(this._defaultClientConfig, section);
|
107
|
+
}
|
108
|
+
return undefined;
|
109
|
+
}
|
110
|
+
isOpenFilesOnly(diagnosticMode) {
|
111
|
+
return diagnosticMode !== 'workspace';
|
112
|
+
}
|
113
|
+
get allowModuleRename() {
|
114
|
+
return false;
|
115
|
+
}
|
116
|
+
getSeverityOverrides(value) {
|
117
|
+
const enumValue = value;
|
118
|
+
if ((0, commandLineOptions_1.getDiagnosticSeverityOverrides)().includes(enumValue)) {
|
119
|
+
return enumValue;
|
120
|
+
}
|
121
|
+
return undefined;
|
122
|
+
}
|
123
|
+
getDiagnosticRuleName(value) {
|
124
|
+
const enumValue = value;
|
125
|
+
if ((0, configOptions_1.getDiagLevelDiagnosticRules)().includes(enumValue)) {
|
126
|
+
return enumValue;
|
127
|
+
}
|
128
|
+
return undefined;
|
129
|
+
}
|
130
|
+
createBackgroundAnalysisProgram(console, configOptions, importResolver, extension, backgroundAnalysis, maxAnalysisTime) {
|
131
|
+
return new backgroundAnalysisProgram_1.BackgroundAnalysisProgram(console, configOptions, importResolver, extension, backgroundAnalysis, maxAnalysisTime);
|
132
|
+
}
|
133
|
+
setExtension(extension) {
|
134
|
+
this._serverOptions.extension = extension;
|
135
|
+
}
|
136
|
+
// Provides access to the client's window.
|
137
|
+
get window() {
|
138
|
+
return this._connection.window;
|
139
|
+
}
|
140
|
+
get supportAdvancedEdits() {
|
141
|
+
return this.client.hasDocumentChangeCapability && this.client.hasDocumentAnnotationCapability;
|
142
|
+
}
|
143
|
+
// Creates a service instance that's used for analyzing a
|
144
|
+
// program within a workspace.
|
145
|
+
createAnalyzerService(name) {
|
146
|
+
this.console.log(`Starting service instance "${name}"`);
|
147
|
+
const service = new service_1.AnalyzerService(name, this.fs, this.console, this.createHost.bind(this), this.createImportResolver.bind(this), undefined, this._serverOptions.extension, this.createBackgroundAnalysis(), this._serverOptions.maxAnalysisTimeInForeground, this.createBackgroundAnalysisProgram.bind(this), this._serverOptions.cancellationProvider);
|
148
|
+
service.setCompletionCallback((results) => this.onAnalysisCompletedHandler(results));
|
149
|
+
return service;
|
150
|
+
}
|
151
|
+
async getWorkspaceForFile(filePath) {
|
152
|
+
const workspace = this._workspaceMap.getWorkspaceForFile(this, filePath);
|
153
|
+
await workspace.isInitialized.promise;
|
154
|
+
return workspace;
|
155
|
+
}
|
156
|
+
reanalyze() {
|
157
|
+
this._workspaceMap.forEach((workspace) => {
|
158
|
+
workspace.serviceInstance.invalidateAndForceReanalysis();
|
159
|
+
});
|
160
|
+
}
|
161
|
+
restart() {
|
162
|
+
this._workspaceMap.forEach((workspace) => {
|
163
|
+
workspace.serviceInstance.restart();
|
164
|
+
});
|
165
|
+
}
|
166
|
+
setupConnection(supportedCommands, supportedCodeActions) {
|
167
|
+
// After the server has started the client sends an initialize request. The server receives
|
168
|
+
// in the passed params the rootPath of the workspace plus the client capabilities.
|
169
|
+
this._connection.onInitialize((params) => this.initialize(params, supportedCommands, supportedCodeActions));
|
170
|
+
this._connection.onInitialized(() => this.onInitialized());
|
171
|
+
this._connection.onDidChangeConfiguration((params) => this.onDidChangeConfiguration(params));
|
172
|
+
this._connection.onCodeAction((params, token) => this.executeCodeAction(params, token));
|
173
|
+
this._connection.onDefinition(async (params, token) => this.onDefinition(params, token));
|
174
|
+
this._connection.onDeclaration(async (params, token) => this.onDeclaration(params, token));
|
175
|
+
this._connection.onTypeDefinition(async (params, token) => this.onTypeDefinition(params, token));
|
176
|
+
this._connection.onReferences(async (params, token, workDoneReporter, resultReporter) => this.onReferences(params, token, workDoneReporter, resultReporter));
|
177
|
+
this._connection.onDocumentSymbol(async (params, token) => this.onDocumentSymbol(params, token));
|
178
|
+
this._connection.onWorkspaceSymbol(async (params, token, _, resultReporter) => this.onWorkspaceSymbol(params, token, resultReporter));
|
179
|
+
this._connection.onHover(async (params, token) => this.onHover(params, token));
|
180
|
+
this._connection.onDocumentHighlight(async (params, token) => this.onDocumentHighlight(params, token));
|
181
|
+
this._connection.onSignatureHelp(async (params, token) => this.onSignatureHelp(params, token));
|
182
|
+
this._connection.onCompletion((params, token) => this.onCompletion(params, token));
|
183
|
+
this._connection.onCompletionResolve(async (params, token) => this.onCompletionResolve(params, token));
|
184
|
+
this._connection.onPrepareRename(async (params, token) => this.onPrepareRenameRequest(params, token));
|
185
|
+
this._connection.onRenameRequest(async (params, token) => this.onRenameRequest(params, token));
|
186
|
+
const callHierarchy = this._connection.languages.callHierarchy;
|
187
|
+
callHierarchy.onPrepare(async (params, token) => this.onPrepare(params, token));
|
188
|
+
callHierarchy.onIncomingCalls(async (params, token) => this.onIncomingCalls(params, token));
|
189
|
+
callHierarchy.onOutgoingCalls(async (params, token) => this.onOutgoingCalls(params, token));
|
190
|
+
this._connection.onDidOpenTextDocument(async (params) => this.onDidOpenTextDocument(params));
|
191
|
+
this._connection.onDidChangeTextDocument(async (params) => this.onDidChangeTextDocument(params));
|
192
|
+
this._connection.onDidCloseTextDocument(async (params) => this.onDidCloseTextDocument(params));
|
193
|
+
this._connection.onDidChangeWatchedFiles((params) => this.onDidChangeWatchedFiles(params));
|
194
|
+
this._connection.onExecuteCommand(async (params, token, reporter) => this.onExecuteCommand(params, token, reporter));
|
195
|
+
}
|
196
|
+
initialize(params, supportedCommands, supportedCodeActions) {
|
197
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
|
198
|
+
if (params.locale) {
|
199
|
+
(0, localize_1.setLocaleOverride)(params.locale);
|
200
|
+
}
|
201
|
+
this.rootPath = params.rootPath || '';
|
202
|
+
const capabilities = params.capabilities;
|
203
|
+
this.client.hasConfigurationCapability = !!((_a = capabilities.workspace) === null || _a === void 0 ? void 0 : _a.configuration);
|
204
|
+
this.client.hasWatchFileCapability = !!((_c = (_b = capabilities.workspace) === null || _b === void 0 ? void 0 : _b.didChangeWatchedFiles) === null || _c === void 0 ? void 0 : _c.dynamicRegistration);
|
205
|
+
this.client.hasWatchFileRelativePathCapability =
|
206
|
+
!!((_e = (_d = capabilities.workspace) === null || _d === void 0 ? void 0 : _d.didChangeWatchedFiles) === null || _e === void 0 ? void 0 : _e.relativePatternSupport);
|
207
|
+
this.client.hasWorkspaceFoldersCapability = !!((_f = capabilities.workspace) === null || _f === void 0 ? void 0 : _f.workspaceFolders);
|
208
|
+
this.client.hasVisualStudioExtensionsCapability = !!capabilities.supportsVisualStudioExtensions;
|
209
|
+
this.client.hasActiveParameterCapability =
|
210
|
+
!!((_j = (_h = (_g = capabilities.textDocument) === null || _g === void 0 ? void 0 : _g.signatureHelp) === null || _h === void 0 ? void 0 : _h.signatureInformation) === null || _j === void 0 ? void 0 : _j.activeParameterSupport);
|
211
|
+
this.client.hasSignatureLabelOffsetCapability =
|
212
|
+
!!((_o = (_m = (_l = (_k = capabilities.textDocument) === null || _k === void 0 ? void 0 : _k.signatureHelp) === null || _l === void 0 ? void 0 : _l.signatureInformation) === null || _m === void 0 ? void 0 : _m.parameterInformation) === null || _o === void 0 ? void 0 : _o.labelOffsetSupport);
|
213
|
+
this.client.hasHierarchicalDocumentSymbolCapability =
|
214
|
+
!!((_q = (_p = capabilities.textDocument) === null || _p === void 0 ? void 0 : _p.documentSymbol) === null || _q === void 0 ? void 0 : _q.hierarchicalDocumentSymbolSupport);
|
215
|
+
this.client.hasDocumentChangeCapability =
|
216
|
+
!!((_s = (_r = capabilities.workspace) === null || _r === void 0 ? void 0 : _r.workspaceEdit) === null || _s === void 0 ? void 0 : _s.documentChanges) &&
|
217
|
+
!!((_t = capabilities.workspace.workspaceEdit) === null || _t === void 0 ? void 0 : _t.resourceOperations);
|
218
|
+
this.client.hasDocumentAnnotationCapability = !!((_v = (_u = capabilities.workspace) === null || _u === void 0 ? void 0 : _u.workspaceEdit) === null || _v === void 0 ? void 0 : _v.changeAnnotationSupport);
|
219
|
+
this.client.hoverContentFormat = this._getCompatibleMarkupKind((_x = (_w = capabilities.textDocument) === null || _w === void 0 ? void 0 : _w.hover) === null || _x === void 0 ? void 0 : _x.contentFormat);
|
220
|
+
this.client.completionDocFormat = this._getCompatibleMarkupKind((_0 = (_z = (_y = capabilities.textDocument) === null || _y === void 0 ? void 0 : _y.completion) === null || _z === void 0 ? void 0 : _z.completionItem) === null || _0 === void 0 ? void 0 : _0.documentationFormat);
|
221
|
+
this.client.completionSupportsSnippet = !!((_3 = (_2 = (_1 = capabilities.textDocument) === null || _1 === void 0 ? void 0 : _1.completion) === null || _2 === void 0 ? void 0 : _2.completionItem) === null || _3 === void 0 ? void 0 : _3.snippetSupport);
|
222
|
+
this.client.signatureDocFormat = this._getCompatibleMarkupKind((_6 = (_5 = (_4 = capabilities.textDocument) === null || _4 === void 0 ? void 0 : _4.signatureHelp) === null || _5 === void 0 ? void 0 : _5.signatureInformation) === null || _6 === void 0 ? void 0 : _6.documentationFormat);
|
223
|
+
const supportedDiagnosticTags = ((_9 = (_8 = (_7 = capabilities.textDocument) === null || _7 === void 0 ? void 0 : _7.publishDiagnostics) === null || _8 === void 0 ? void 0 : _8.tagSupport) === null || _9 === void 0 ? void 0 : _9.valueSet) || [];
|
224
|
+
this.client.supportsUnnecessaryDiagnosticTag = supportedDiagnosticTags.some((tag) => tag === vscode_languageserver_1.DiagnosticTag.Unnecessary);
|
225
|
+
this.client.supportsDeprecatedDiagnosticTag = supportedDiagnosticTags.some((tag) => tag === vscode_languageserver_1.DiagnosticTag.Deprecated);
|
226
|
+
this.client.hasWindowProgressCapability = !!((_10 = capabilities.window) === null || _10 === void 0 ? void 0 : _10.workDoneProgress);
|
227
|
+
this.client.hasGoToDeclarationCapability = !!((_11 = capabilities.textDocument) === null || _11 === void 0 ? void 0 : _11.declaration);
|
228
|
+
this.client.completionItemResolveSupportsAdditionalTextEdits =
|
229
|
+
!!((_15 = (_14 = (_13 = (_12 = capabilities.textDocument) === null || _12 === void 0 ? void 0 : _12.completion) === null || _13 === void 0 ? void 0 : _13.completionItem) === null || _14 === void 0 ? void 0 : _14.resolveSupport) === null || _15 === void 0 ? void 0 : _15.properties.some((p) => p === 'additionalTextEdits'));
|
230
|
+
// Create a service instance for each of the workspace folders.
|
231
|
+
if (params.workspaceFolders) {
|
232
|
+
params.workspaceFolders.forEach((folder) => {
|
233
|
+
const path = this._uriParser.decodeTextDocumentUri(folder.uri);
|
234
|
+
this._workspaceMap.set(path, this.createWorkspaceServiceInstance(folder, path));
|
235
|
+
});
|
236
|
+
}
|
237
|
+
else if (params.rootPath) {
|
238
|
+
this._workspaceMap.set(params.rootPath, this.createWorkspaceServiceInstance(undefined, params.rootPath));
|
239
|
+
}
|
240
|
+
const result = {
|
241
|
+
capabilities: {
|
242
|
+
textDocumentSync: vscode_languageserver_1.TextDocumentSyncKind.Incremental,
|
243
|
+
definitionProvider: { workDoneProgress: true },
|
244
|
+
declarationProvider: { workDoneProgress: true },
|
245
|
+
typeDefinitionProvider: { workDoneProgress: true },
|
246
|
+
referencesProvider: { workDoneProgress: true },
|
247
|
+
documentSymbolProvider: { workDoneProgress: true },
|
248
|
+
workspaceSymbolProvider: { workDoneProgress: true },
|
249
|
+
hoverProvider: { workDoneProgress: true },
|
250
|
+
documentHighlightProvider: { workDoneProgress: true },
|
251
|
+
renameProvider: { prepareProvider: true, workDoneProgress: true },
|
252
|
+
completionProvider: {
|
253
|
+
triggerCharacters: this.client.hasVisualStudioExtensionsCapability ? ['.', '[', '@'] : ['.', '['],
|
254
|
+
resolveProvider: true,
|
255
|
+
workDoneProgress: true,
|
256
|
+
completionItem: {
|
257
|
+
labelDetailsSupport: true,
|
258
|
+
},
|
259
|
+
},
|
260
|
+
signatureHelpProvider: {
|
261
|
+
triggerCharacters: ['(', ',', ')'],
|
262
|
+
workDoneProgress: true,
|
263
|
+
},
|
264
|
+
codeActionProvider: {
|
265
|
+
codeActionKinds: supportedCodeActions,
|
266
|
+
workDoneProgress: true,
|
267
|
+
},
|
268
|
+
executeCommandProvider: {
|
269
|
+
commands: supportedCommands,
|
270
|
+
workDoneProgress: true,
|
271
|
+
},
|
272
|
+
callHierarchyProvider: true,
|
273
|
+
},
|
274
|
+
};
|
275
|
+
return result;
|
276
|
+
}
|
277
|
+
onInitialized() {
|
278
|
+
if (this.client.hasWorkspaceFoldersCapability) {
|
279
|
+
this._connection.workspace.onDidChangeWorkspaceFolders((event) => {
|
280
|
+
event.removed.forEach((workspace) => {
|
281
|
+
const rootPath = this._uriParser.decodeTextDocumentUri(workspace.uri);
|
282
|
+
this._workspaceMap.delete(rootPath);
|
283
|
+
});
|
284
|
+
event.added.forEach(async (workspace) => {
|
285
|
+
const rootPath = this._uriParser.decodeTextDocumentUri(workspace.uri);
|
286
|
+
const newWorkspace = this.createWorkspaceServiceInstance(workspace, rootPath);
|
287
|
+
this._workspaceMap.set(rootPath, newWorkspace);
|
288
|
+
await this.updateSettingsForWorkspace(newWorkspace);
|
289
|
+
});
|
290
|
+
this._setupFileWatcher();
|
291
|
+
});
|
292
|
+
this._setupFileWatcher();
|
293
|
+
}
|
294
|
+
}
|
295
|
+
_setupFileWatcher() {
|
296
|
+
if (!this.client.hasWatchFileCapability) {
|
297
|
+
return;
|
298
|
+
}
|
299
|
+
const watchKind = vscode_languageserver_1.WatchKind.Create | vscode_languageserver_1.WatchKind.Change | vscode_languageserver_1.WatchKind.Delete;
|
300
|
+
// Set default (config files and all workspace files) first.
|
301
|
+
const watchers = [
|
302
|
+
...service_1.configFileNames.map((fileName) => ({ globPattern: `**/${fileName}`, kind: watchKind })),
|
303
|
+
{ globPattern: '**', kind: watchKind },
|
304
|
+
];
|
305
|
+
// Add all python search paths to watch list
|
306
|
+
if (this.client.hasWatchFileRelativePathCapability) {
|
307
|
+
for (const workspace of this._workspaceMap.getNonDefaultWorkspaces()) {
|
308
|
+
workspace.searchPathsToWatch.forEach((p) => {
|
309
|
+
const globPattern = (0, pathUtils_1.isFile)(this.fs, p, /* treatZipDirectoryAsFile */ true)
|
310
|
+
? { baseUri: (0, pathUtils_1.convertPathToUri)(this.fs, (0, pathUtils_1.getDirectoryPath)(p)), pattern: (0, pathUtils_1.getFileName)(p) }
|
311
|
+
: { baseUri: (0, pathUtils_1.convertPathToUri)(this.fs, p), pattern: '**' };
|
312
|
+
watchers.push({ globPattern, kind: watchKind });
|
313
|
+
});
|
314
|
+
}
|
315
|
+
}
|
316
|
+
this._connection.client.register(vscode_languageserver_1.DidChangeWatchedFilesNotification.type, { watchers }).then((d) => {
|
317
|
+
if (this._lastFileWatcherRegistration) {
|
318
|
+
this._lastFileWatcherRegistration.dispose();
|
319
|
+
}
|
320
|
+
this._lastFileWatcherRegistration = d;
|
321
|
+
});
|
322
|
+
}
|
323
|
+
onDidChangeConfiguration(params) {
|
324
|
+
this.console.log(`Received updated settings`);
|
325
|
+
if (params === null || params === void 0 ? void 0 : params.settings) {
|
326
|
+
this._defaultClientConfig = params === null || params === void 0 ? void 0 : params.settings;
|
327
|
+
}
|
328
|
+
this.updateSettingsForAllWorkspaces();
|
329
|
+
}
|
330
|
+
async onDefinition(params, token) {
|
331
|
+
return this.getDefinitions(params, token, this.client.hasGoToDeclarationCapability ? definitionProvider_1.DefinitionFilter.PreferSource : definitionProvider_1.DefinitionFilter.All, (workspace, filePath, position, filter, token) => workspace.serviceInstance.getDefinitionForPosition(filePath, position, filter, token));
|
332
|
+
}
|
333
|
+
async onDeclaration(params, token) {
|
334
|
+
return this.getDefinitions(params, token, this.client.hasGoToDeclarationCapability ? definitionProvider_1.DefinitionFilter.PreferStubs : definitionProvider_1.DefinitionFilter.All, (workspace, filePath, position, filter, token) => workspace.serviceInstance.getDefinitionForPosition(filePath, position, filter, token));
|
335
|
+
}
|
336
|
+
async onTypeDefinition(params, token) {
|
337
|
+
return this.getDefinitions(params, token, definitionProvider_1.DefinitionFilter.All, (workspace, filePath, position, _, token) => workspace.serviceInstance.getTypeDefinitionForPosition(filePath, position, token));
|
338
|
+
}
|
339
|
+
async getDefinitions(params, token, filter, getDefinitionsFunc) {
|
340
|
+
this.recordUserInteractionTime();
|
341
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.textDocument, params.position);
|
342
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
343
|
+
if (workspace.disableLanguageServices) {
|
344
|
+
return undefined;
|
345
|
+
}
|
346
|
+
const locations = getDefinitionsFunc(workspace, filePath, position, filter, token);
|
347
|
+
if (!locations) {
|
348
|
+
return undefined;
|
349
|
+
}
|
350
|
+
return locations
|
351
|
+
.filter((loc) => !this.fs.isInZipOrEgg(loc.path))
|
352
|
+
.map((loc) => vscode_languageserver_1.Location.create((0, pathUtils_1.convertPathToUri)(this.fs, loc.path), loc.range));
|
353
|
+
}
|
354
|
+
async onReferences(params, token, workDoneReporter, resultReporter) {
|
355
|
+
if (this._pendingFindAllRefsCancellationSource) {
|
356
|
+
this._pendingFindAllRefsCancellationSource.cancel();
|
357
|
+
this._pendingFindAllRefsCancellationSource = undefined;
|
358
|
+
}
|
359
|
+
// VS Code doesn't support cancellation of "final all references".
|
360
|
+
// We provide a progress bar a cancellation button so the user can cancel
|
361
|
+
// any long-running actions.
|
362
|
+
const progress = await this._getProgressReporter(workDoneReporter, localize_1.Localizer.CodeAction.findingReferences(), token);
|
363
|
+
const source = progress.source;
|
364
|
+
this._pendingFindAllRefsCancellationSource = source;
|
365
|
+
try {
|
366
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.textDocument, params.position);
|
367
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
368
|
+
if (workspace.disableLanguageServices) {
|
369
|
+
return;
|
370
|
+
}
|
371
|
+
const convert = (locs) => {
|
372
|
+
return locs
|
373
|
+
.filter((loc) => !this.fs.isInZipOrEgg(loc.path))
|
374
|
+
.map((loc) => vscode_languageserver_1.Location.create((0, pathUtils_1.convertPathToUri)(this.fs, loc.path), loc.range));
|
375
|
+
};
|
376
|
+
const locations = [];
|
377
|
+
const reporter = resultReporter
|
378
|
+
? (locs) => resultReporter.report(convert(locs))
|
379
|
+
: (locs) => (0, collectionUtils_1.appendArray)(locations, convert(locs));
|
380
|
+
workspace.serviceInstance.reportReferencesForPosition(filePath, position, params.context.includeDeclaration, reporter, source.token);
|
381
|
+
return locations;
|
382
|
+
}
|
383
|
+
finally {
|
384
|
+
progress.reporter.done();
|
385
|
+
source.dispose();
|
386
|
+
}
|
387
|
+
}
|
388
|
+
async onDocumentSymbol(params, token) {
|
389
|
+
this.recordUserInteractionTime();
|
390
|
+
const filePath = this._uriParser.decodeTextDocumentUri(params.textDocument.uri);
|
391
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
392
|
+
if (workspace.disableLanguageServices) {
|
393
|
+
return undefined;
|
394
|
+
}
|
395
|
+
const symbolList = [];
|
396
|
+
workspace.serviceInstance.addSymbolsForDocument(filePath, symbolList, token);
|
397
|
+
if (this.client.hasHierarchicalDocumentSymbolCapability) {
|
398
|
+
return symbolList;
|
399
|
+
}
|
400
|
+
return (0, documentSymbolProvider_1.convertToFlatSymbols)(params.textDocument.uri, symbolList);
|
401
|
+
}
|
402
|
+
async onWorkspaceSymbol(params, token, resultReporter) {
|
403
|
+
const symbolList = [];
|
404
|
+
const reporter = resultReporter
|
405
|
+
? (symbols) => resultReporter.report(symbols)
|
406
|
+
: (symbols) => (0, collectionUtils_1.appendArray)(symbolList, symbols);
|
407
|
+
for (const workspace of this._workspaceMap.values()) {
|
408
|
+
await workspace.isInitialized.promise;
|
409
|
+
if (!workspace.disableLanguageServices && !workspace.disableWorkspaceSymbol) {
|
410
|
+
workspace.serviceInstance.reportSymbolsForWorkspace(params.query, reporter, token);
|
411
|
+
}
|
412
|
+
}
|
413
|
+
return symbolList;
|
414
|
+
}
|
415
|
+
async onHover(params, token) {
|
416
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.textDocument, params.position);
|
417
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
418
|
+
const hoverResults = workspace.serviceInstance.getHoverForPosition(filePath, position, this.client.hoverContentFormat, token);
|
419
|
+
return (0, hoverProvider_1.convertHoverResults)(this.client.hoverContentFormat, hoverResults);
|
420
|
+
}
|
421
|
+
async onDocumentHighlight(params, token) {
|
422
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.textDocument, params.position);
|
423
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
424
|
+
return workspace.serviceInstance.getDocumentHighlight(filePath, position, token);
|
425
|
+
}
|
426
|
+
async onSignatureHelp(params, token) {
|
427
|
+
var _a, _b;
|
428
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.textDocument, params.position);
|
429
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
430
|
+
if (workspace.disableLanguageServices) {
|
431
|
+
return;
|
432
|
+
}
|
433
|
+
const signatureHelpResults = workspace.serviceInstance.getSignatureHelpForPosition(filePath, position, this.client.signatureDocFormat, token);
|
434
|
+
if (!signatureHelpResults) {
|
435
|
+
return undefined;
|
436
|
+
}
|
437
|
+
const signatures = signatureHelpResults.signatures.map((sig) => {
|
438
|
+
let paramInfo = [];
|
439
|
+
if (sig.parameters) {
|
440
|
+
paramInfo = sig.parameters.map((param) => vscode_languageserver_1.ParameterInformation.create(this.client.hasSignatureLabelOffsetCapability
|
441
|
+
? [param.startOffset, param.endOffset]
|
442
|
+
: param.text, param.documentation));
|
443
|
+
}
|
444
|
+
const sigInfo = vscode_languageserver_1.SignatureInformation.create(sig.label, /* documentation */ undefined, ...paramInfo);
|
445
|
+
if (sig.documentation !== undefined) {
|
446
|
+
sigInfo.documentation = sig.documentation;
|
447
|
+
}
|
448
|
+
if (sig.activeParameter !== undefined) {
|
449
|
+
sigInfo.activeParameter = sig.activeParameter;
|
450
|
+
}
|
451
|
+
return sigInfo;
|
452
|
+
});
|
453
|
+
// A signature is active if it contains an active parameter,
|
454
|
+
// or if both the signature and its invocation have no parameters.
|
455
|
+
const isActive = (sig) => { var _a; return sig.activeParameter !== undefined || (!signatureHelpResults.callHasParameters && !((_a = sig.parameters) === null || _a === void 0 ? void 0 : _a.length)); };
|
456
|
+
let activeSignature = signatures.findIndex(isActive);
|
457
|
+
if (activeSignature === -1) {
|
458
|
+
activeSignature = undefined;
|
459
|
+
}
|
460
|
+
let activeParameter = activeSignature !== undefined ? signatures[activeSignature].activeParameter : undefined;
|
461
|
+
// Check if we should reuse the user's signature selection. If the retrigger was not "invoked"
|
462
|
+
// (i.e., the signature help call was automatically generated by the client due to some navigation
|
463
|
+
// or text change), check to see if the previous signature is still "active". If so, we mark it as
|
464
|
+
// active in our response.
|
465
|
+
//
|
466
|
+
// This isn't a perfect method. For nested calls, we can't tell when we are moving between them.
|
467
|
+
// Ideally, we would include a token in the signature help responses to compare later, allowing us
|
468
|
+
// to know when the user's navigated to a nested call (and therefore the old signature's info does
|
469
|
+
// not apply), but for now manually retriggering the signature help will work around the issue.
|
470
|
+
if (((_a = params.context) === null || _a === void 0 ? void 0 : _a.isRetrigger) && params.context.triggerKind !== vscode_languageserver_1.SignatureHelpTriggerKind.Invoked) {
|
471
|
+
const prevActiveSignature = (_b = params.context.activeSignatureHelp) === null || _b === void 0 ? void 0 : _b.activeSignature;
|
472
|
+
if (prevActiveSignature !== undefined && prevActiveSignature < signatures.length) {
|
473
|
+
const sig = signatures[prevActiveSignature];
|
474
|
+
if (isActive(sig)) {
|
475
|
+
activeSignature = prevActiveSignature;
|
476
|
+
activeParameter = sig.activeParameter;
|
477
|
+
}
|
478
|
+
}
|
479
|
+
}
|
480
|
+
if (this.client.hasActiveParameterCapability || activeSignature === undefined) {
|
481
|
+
// If there is no active parameter, then we want the client to not highlight anything.
|
482
|
+
// Unfortunately, the LSP spec says that "undefined" or "out of bounds" values should be
|
483
|
+
// treated as 0, which is the first parameter. That's not what we want, but thankfully
|
484
|
+
// VS Code (and potentially other clients) choose to handle out of bounds values by
|
485
|
+
// not highlighting them, which is what we want.
|
486
|
+
//
|
487
|
+
// The spec defines activeParameter as uinteger, so use the maximum length of any
|
488
|
+
// signature's parameter list to ensure that the value is always out of range.
|
489
|
+
//
|
490
|
+
// We always set this even if some signature has an active parameter, as this
|
491
|
+
// value is used as the fallback for signatures that don't explicitly specify an
|
492
|
+
// active parameter (and we use "undefined" to mean "no active parameter").
|
493
|
+
//
|
494
|
+
// We could apply this hack to each individual signature such that they all specify
|
495
|
+
// activeParameter, but that would make it more difficult to determine which actually
|
496
|
+
// are active when comparing, and we already have to set this for clients which don't
|
497
|
+
// support per-signature activeParameter.
|
498
|
+
//
|
499
|
+
// See:
|
500
|
+
// - https://github.com/microsoft/language-server-protocol/issues/1271
|
501
|
+
// - https://github.com/microsoft/pyright/pull/1783
|
502
|
+
activeParameter = Math.max(...signatures.map((s) => { var _a, _b; return (_b = (_a = s.parameters) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0; }));
|
503
|
+
}
|
504
|
+
return { signatures, activeSignature, activeParameter };
|
505
|
+
}
|
506
|
+
async onCompletion(params, token) {
|
507
|
+
var _a, _b;
|
508
|
+
// We set completion incomplete for the first invocation and next consecutive call,
|
509
|
+
// but after that we mark it as completed so the client doesn't repeatedly call back.
|
510
|
+
// We mark the first one as incomplete because completion could be invoked without
|
511
|
+
// any meaningful character provided, such as an explicit completion invocation (ctrl+space)
|
512
|
+
// or a period. That might cause us to not include some items (e.g., auto-imports).
|
513
|
+
// The next consecutive call provides some characters to help us to pick
|
514
|
+
// better completion items. After that, we are not going to introduce new items,
|
515
|
+
// so we can let the client to do the filtering and caching.
|
516
|
+
const completionIncomplete = this._lastTriggerKind !== vscode_languageserver_1.CompletionTriggerKind.TriggerForIncompleteCompletions ||
|
517
|
+
((_a = params.context) === null || _a === void 0 ? void 0 : _a.triggerKind) !== vscode_languageserver_1.CompletionTriggerKind.TriggerForIncompleteCompletions;
|
518
|
+
this._lastTriggerKind = (_b = params.context) === null || _b === void 0 ? void 0 : _b.triggerKind;
|
519
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.textDocument, params.position);
|
520
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
521
|
+
if (workspace.disableLanguageServices) {
|
522
|
+
return;
|
523
|
+
}
|
524
|
+
const completions = await this.getWorkspaceCompletionsForPosition(workspace, filePath, position, workspace.rootPath, this.getCompletionOptions(params), token);
|
525
|
+
if (completions && completions.completionList) {
|
526
|
+
completions.completionList.isIncomplete = completionIncomplete;
|
527
|
+
}
|
528
|
+
return completions === null || completions === void 0 ? void 0 : completions.completionList;
|
529
|
+
}
|
530
|
+
// Cancellation bugs in vscode and LSP:
|
531
|
+
// https://github.com/microsoft/vscode-languageserver-node/issues/615
|
532
|
+
// https://github.com/microsoft/vscode/issues/95485
|
533
|
+
//
|
534
|
+
// If resolver throws cancellation exception, LSP and VSCode
|
535
|
+
// cache that result and never call us back.
|
536
|
+
async onCompletionResolve(params, token) {
|
537
|
+
const completionItemData = (0, lspUtils_1.fromLSPAny)(params.data);
|
538
|
+
if (completionItemData && completionItemData.filePath) {
|
539
|
+
const workspace = await this.getWorkspaceForFile(completionItemData.workspacePath);
|
540
|
+
this.resolveWorkspaceCompletionItem(workspace, completionItemData.filePath, params, token);
|
541
|
+
}
|
542
|
+
return params;
|
543
|
+
}
|
544
|
+
async onPrepareRenameRequest(params, token) {
|
545
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.textDocument, params.position);
|
546
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
547
|
+
if (workspace.disableLanguageServices) {
|
548
|
+
return null;
|
549
|
+
}
|
550
|
+
const range = workspace.serviceInstance.canRenameSymbolAtPosition(filePath, position, workspace.rootPath === '', this.allowModuleRename, token);
|
551
|
+
return range !== null && range !== void 0 ? range : null;
|
552
|
+
}
|
553
|
+
async onRenameRequest(params, token) {
|
554
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.textDocument, params.position);
|
555
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
556
|
+
if (workspace.disableLanguageServices) {
|
557
|
+
return;
|
558
|
+
}
|
559
|
+
const editActions = workspace.serviceInstance.renameSymbolAtPosition(filePath, position, params.newName, workspace.rootPath === '', this.allowModuleRename, token);
|
560
|
+
if (!editActions) {
|
561
|
+
return undefined;
|
562
|
+
}
|
563
|
+
return (0, workspaceEditUtils_1.convertWorkspaceDocumentEdits)(this.fs, editActions);
|
564
|
+
}
|
565
|
+
async onPrepare(params, token) {
|
566
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.textDocument, params.position);
|
567
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
568
|
+
if (workspace.disableLanguageServices) {
|
569
|
+
return null;
|
570
|
+
}
|
571
|
+
const callItem = workspace.serviceInstance.getCallForPosition(filePath, position, token) || null;
|
572
|
+
if (!callItem) {
|
573
|
+
return null;
|
574
|
+
}
|
575
|
+
if (this.fs.isInZipOrEgg(callItem.uri)) {
|
576
|
+
return null;
|
577
|
+
}
|
578
|
+
// Convert the file path in the item to proper URI.
|
579
|
+
callItem.uri = (0, pathUtils_1.convertPathToUri)(this.fs, callItem.uri);
|
580
|
+
return [callItem];
|
581
|
+
}
|
582
|
+
async onIncomingCalls(params, token) {
|
583
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.item, params.item.range.start);
|
584
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
585
|
+
if (workspace.disableLanguageServices) {
|
586
|
+
return null;
|
587
|
+
}
|
588
|
+
let callItems = workspace.serviceInstance.getIncomingCallsForPosition(filePath, position, token) || null;
|
589
|
+
if (!callItems || callItems.length === 0) {
|
590
|
+
return null;
|
591
|
+
}
|
592
|
+
callItems = callItems.filter((item) => !this.fs.isInZipOrEgg(item.from.uri));
|
593
|
+
// Convert the file paths in the items to proper URIs.
|
594
|
+
callItems.forEach((item) => {
|
595
|
+
item.from.uri = (0, pathUtils_1.convertPathToUri)(this.fs, item.from.uri);
|
596
|
+
});
|
597
|
+
return callItems;
|
598
|
+
}
|
599
|
+
async onOutgoingCalls(params, token) {
|
600
|
+
const { filePath, position } = this._uriParser.decodeTextDocumentPosition(params.item, params.item.range.start);
|
601
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
602
|
+
if (workspace.disableLanguageServices) {
|
603
|
+
return null;
|
604
|
+
}
|
605
|
+
let callItems = workspace.serviceInstance.getOutgoingCallsForPosition(filePath, position, token) || null;
|
606
|
+
if (!callItems || callItems.length === 0) {
|
607
|
+
return null;
|
608
|
+
}
|
609
|
+
callItems = callItems.filter((item) => !this.fs.isInZipOrEgg(item.to.uri));
|
610
|
+
// Convert the file paths in the items to proper URIs.
|
611
|
+
callItems.forEach((item) => {
|
612
|
+
item.to.uri = (0, pathUtils_1.convertPathToUri)(this.fs, item.to.uri);
|
613
|
+
});
|
614
|
+
return callItems;
|
615
|
+
}
|
616
|
+
async onDidOpenTextDocument(params, ipythonMode = false) {
|
617
|
+
const filePath = this._uriParser.decodeTextDocumentUri(params.textDocument.uri);
|
618
|
+
if (!this.fs.addUriMap(params.textDocument.uri, filePath)) {
|
619
|
+
// We do not support opening 1 file with 2 different uri.
|
620
|
+
return;
|
621
|
+
}
|
622
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
623
|
+
workspace.serviceInstance.setFileOpened(filePath, params.textDocument.version, params.textDocument.text, ipythonMode);
|
624
|
+
}
|
625
|
+
async onDidChangeTextDocument(params, ipythonMode = false) {
|
626
|
+
this.recordUserInteractionTime();
|
627
|
+
const filePath = this._uriParser.decodeTextDocumentUri(params.textDocument.uri);
|
628
|
+
if (!this.fs.hasUriMapEntry(params.textDocument.uri, filePath)) {
|
629
|
+
// We do not support opening 1 file with 2 different uri.
|
630
|
+
return;
|
631
|
+
}
|
632
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
633
|
+
workspace.serviceInstance.updateOpenFileContents(filePath, params.textDocument.version, params.contentChanges, ipythonMode);
|
634
|
+
}
|
635
|
+
async onDidCloseTextDocument(params) {
|
636
|
+
const filePath = this._uriParser.decodeTextDocumentUri(params.textDocument.uri);
|
637
|
+
if (!this.fs.removeUriMap(params.textDocument.uri, filePath)) {
|
638
|
+
// We do not support opening 1 file with 2 different uri.
|
639
|
+
return;
|
640
|
+
}
|
641
|
+
const workspace = await this.getWorkspaceForFile(filePath);
|
642
|
+
workspace.serviceInstance.setFileClosed(filePath);
|
643
|
+
}
|
644
|
+
onDidChangeWatchedFiles(params) {
|
645
|
+
params.changes.forEach((change) => {
|
646
|
+
const filePath = this.fs.realCasePath(this._uriParser.decodeTextDocumentUri(change.uri));
|
647
|
+
const eventType = change.type === 1 ? 'add' : 'change';
|
648
|
+
this._fileWatcherProvider.onFileChange(eventType, filePath);
|
649
|
+
});
|
650
|
+
}
|
651
|
+
async onExecuteCommand(params, token, reporter) {
|
652
|
+
// Cancel running command if there is one.
|
653
|
+
if (this._pendingCommandCancellationSource) {
|
654
|
+
this._pendingCommandCancellationSource.cancel();
|
655
|
+
this._pendingCommandCancellationSource = undefined;
|
656
|
+
}
|
657
|
+
const executeCommand = async (token) => {
|
658
|
+
const result = await this.executeCommand(params, token);
|
659
|
+
if (vscode_languageserver_1.WorkspaceEdit.is(result)) {
|
660
|
+
// Tell client to apply edits.
|
661
|
+
// Do not await; the client isn't expecting a result.
|
662
|
+
this._connection.workspace.applyEdit({ label: `Command '${params.command}'`, edit: result });
|
663
|
+
}
|
664
|
+
if (commandResult_1.CommandResult.is(result)) {
|
665
|
+
// Tell client to apply edits.
|
666
|
+
// Await so that we return after the edit is complete.
|
667
|
+
await this._connection.workspace.applyEdit({ label: result.label, edit: result.edits });
|
668
|
+
}
|
669
|
+
return result;
|
670
|
+
};
|
671
|
+
if (this.isLongRunningCommand(params.command)) {
|
672
|
+
// Create a progress dialog for long-running commands.
|
673
|
+
const progress = await this._getProgressReporter(reporter, localize_1.Localizer.CodeAction.executingCommand(), token);
|
674
|
+
const source = progress.source;
|
675
|
+
this._pendingCommandCancellationSource = source;
|
676
|
+
try {
|
677
|
+
const result = await executeCommand(source.token);
|
678
|
+
return result;
|
679
|
+
}
|
680
|
+
finally {
|
681
|
+
progress.reporter.done();
|
682
|
+
source.dispose();
|
683
|
+
}
|
684
|
+
}
|
685
|
+
else {
|
686
|
+
const result = await executeCommand(token);
|
687
|
+
return result;
|
688
|
+
}
|
689
|
+
}
|
690
|
+
resolveWorkspaceCompletionItem(workspace, filePath, item, token) {
|
691
|
+
workspace.serviceInstance.resolveCompletionItem(filePath, item, this.getCompletionOptions(),
|
692
|
+
/* nameMap */ undefined, token);
|
693
|
+
}
|
694
|
+
getWorkspaceCompletionsForPosition(workspace, filePath, position, workspacePath, options, token) {
|
695
|
+
return workspace.serviceInstance.getCompletionsForPosition(filePath, position, workspacePath, options, undefined, token);
|
696
|
+
}
|
697
|
+
updateSettingsForAllWorkspaces() {
|
698
|
+
const tasks = [];
|
699
|
+
this._workspaceMap.forEach((workspace) => {
|
700
|
+
tasks.push(this.updateSettingsForWorkspace(workspace));
|
701
|
+
});
|
702
|
+
Promise.all(tasks).then(() => {
|
703
|
+
this._setupFileWatcher();
|
704
|
+
});
|
705
|
+
}
|
706
|
+
getCompletionOptions(params) {
|
707
|
+
return {
|
708
|
+
format: this.client.completionDocFormat,
|
709
|
+
snippet: this.client.completionSupportsSnippet,
|
710
|
+
lazyEdit: this.client.completionItemResolveSupportsAdditionalTextEdits,
|
711
|
+
autoImport: true,
|
712
|
+
};
|
713
|
+
}
|
714
|
+
createWorkspaceServiceInstance(workspace, rootPath) {
|
715
|
+
var _a, _b, _c;
|
716
|
+
return {
|
717
|
+
workspaceName: (_a = workspace === null || workspace === void 0 ? void 0 : workspace.name) !== null && _a !== void 0 ? _a : '',
|
718
|
+
rootPath,
|
719
|
+
rootUri: (_b = workspace === null || workspace === void 0 ? void 0 : workspace.uri) !== null && _b !== void 0 ? _b : '',
|
720
|
+
serviceInstance: this.createAnalyzerService((_c = workspace === null || workspace === void 0 ? void 0 : workspace.name) !== null && _c !== void 0 ? _c : rootPath),
|
721
|
+
disableLanguageServices: false,
|
722
|
+
disableOrganizeImports: false,
|
723
|
+
disableWorkspaceSymbol: false,
|
724
|
+
isInitialized: (0, deferred_1.createDeferred)(),
|
725
|
+
searchPathsToWatch: [],
|
726
|
+
};
|
727
|
+
}
|
728
|
+
convertDiagnostics(fileDiagnostics) {
|
729
|
+
return [
|
730
|
+
{
|
731
|
+
uri: (0, pathUtils_1.convertPathToUri)(this.fs, fileDiagnostics.filePath),
|
732
|
+
version: fileDiagnostics.version,
|
733
|
+
diagnostics: this._convertDiagnostics(fileDiagnostics.diagnostics),
|
734
|
+
},
|
735
|
+
];
|
736
|
+
}
|
737
|
+
onAnalysisCompletedHandler(results) {
|
738
|
+
// Send the computed diagnostics to the client.
|
739
|
+
results.diagnostics.forEach((fileDiag) => {
|
740
|
+
if (this.fs.isInZipOrEgg(fileDiag.filePath)) {
|
741
|
+
return;
|
742
|
+
}
|
743
|
+
this._sendDiagnostics(this.convertDiagnostics(fileDiag));
|
744
|
+
this.fs.pendingRequest(fileDiag.filePath, fileDiag.diagnostics.length > 0);
|
745
|
+
});
|
746
|
+
if (!this._progressReporter.isEnabled(results)) {
|
747
|
+
// Make sure to disable progress bar if it is currently active.
|
748
|
+
// This can happen if a user changes typeCheckingMode in the middle
|
749
|
+
// of analysis.
|
750
|
+
// end() is noop if there is no active progress bar.
|
751
|
+
this._progressReporter.end();
|
752
|
+
return;
|
753
|
+
}
|
754
|
+
// Update progress.
|
755
|
+
if (results.filesRequiringAnalysis > 0) {
|
756
|
+
this._progressReporter.begin();
|
757
|
+
const progressMessage = results.filesRequiringAnalysis === 1
|
758
|
+
? localize_1.Localizer.CodeAction.filesToAnalyzeOne()
|
759
|
+
: localize_1.Localizer.CodeAction.filesToAnalyzeCount().format({
|
760
|
+
count: results.filesRequiringAnalysis,
|
761
|
+
});
|
762
|
+
this._progressReporter.report(progressMessage);
|
763
|
+
}
|
764
|
+
else {
|
765
|
+
this._progressReporter.end();
|
766
|
+
}
|
767
|
+
}
|
768
|
+
async updateSettingsForWorkspace(workspace, serverSettings) {
|
769
|
+
var _a;
|
770
|
+
serverSettings = serverSettings !== null && serverSettings !== void 0 ? serverSettings : (await this.getSettings(workspace));
|
771
|
+
// Set logging level first.
|
772
|
+
this.console.level = (_a = serverSettings.logLevel) !== null && _a !== void 0 ? _a : console_1.LogLevel.Info;
|
773
|
+
this.updateOptionsAndRestartService(workspace, serverSettings);
|
774
|
+
workspace.disableLanguageServices = !!serverSettings.disableLanguageServices;
|
775
|
+
workspace.disableOrganizeImports = !!serverSettings.disableOrganizeImports;
|
776
|
+
// The workspace is now open for business.
|
777
|
+
workspace.isInitialized.resolve(true);
|
778
|
+
}
|
779
|
+
updateOptionsAndRestartService(workspace, serverSettings, typeStubTargetImportName) {
|
780
|
+
var _a;
|
781
|
+
analyzerServiceExecutor_1.AnalyzerServiceExecutor.runWithOptions(this.rootPath, workspace, serverSettings, typeStubTargetImportName);
|
782
|
+
workspace.searchPathsToWatch = (_a = workspace.serviceInstance.librarySearchPathsToWatch) !== null && _a !== void 0 ? _a : [];
|
783
|
+
}
|
784
|
+
convertLogLevel(logLevelValue) {
|
785
|
+
if (!logLevelValue) {
|
786
|
+
return console_1.LogLevel.Info;
|
787
|
+
}
|
788
|
+
switch (logLevelValue.toLowerCase()) {
|
789
|
+
case 'error':
|
790
|
+
return console_1.LogLevel.Error;
|
791
|
+
case 'warning':
|
792
|
+
return console_1.LogLevel.Warn;
|
793
|
+
case 'information':
|
794
|
+
return console_1.LogLevel.Info;
|
795
|
+
case 'trace':
|
796
|
+
return console_1.LogLevel.Log;
|
797
|
+
default:
|
798
|
+
return console_1.LogLevel.Info;
|
799
|
+
}
|
800
|
+
}
|
801
|
+
_sendDiagnostics(params) {
|
802
|
+
for (const param of params) {
|
803
|
+
this._connection.sendDiagnostics(param);
|
804
|
+
}
|
805
|
+
}
|
806
|
+
_getCompatibleMarkupKind(clientSupportedFormats) {
|
807
|
+
const serverSupportedFormats = [vscode_languageserver_1.MarkupKind.PlainText, vscode_languageserver_1.MarkupKind.Markdown];
|
808
|
+
for (const format of clientSupportedFormats !== null && clientSupportedFormats !== void 0 ? clientSupportedFormats : []) {
|
809
|
+
if (serverSupportedFormats.includes(format)) {
|
810
|
+
return format;
|
811
|
+
}
|
812
|
+
}
|
813
|
+
return vscode_languageserver_1.MarkupKind.PlainText;
|
814
|
+
}
|
815
|
+
async _getProgressReporter(reporter, title, token) {
|
816
|
+
// This is a bit ugly, but we need to determine whether the provided reporter
|
817
|
+
// is an actual client-side progress reporter or a dummy (null) progress reporter
|
818
|
+
// created by the LSP library. If it's the latter, we'll create a server-initiated
|
819
|
+
// progress reporter.
|
820
|
+
if (reporter.constructor !== nullProgressReporter.constructor) {
|
821
|
+
return { reporter: reporter, source: (0, cancellationUtils_1.CancelAfter)(token) };
|
822
|
+
}
|
823
|
+
const serverInitiatedReporter = await this._connection.window.createWorkDoneProgress();
|
824
|
+
serverInitiatedReporter.begin(title,
|
825
|
+
/* percentage */ undefined,
|
826
|
+
/* message */ undefined,
|
827
|
+
/* cancellable */ true);
|
828
|
+
return {
|
829
|
+
reporter: serverInitiatedReporter,
|
830
|
+
source: (0, cancellationUtils_1.CancelAfter)(token, serverInitiatedReporter.token),
|
831
|
+
};
|
832
|
+
}
|
833
|
+
_convertDiagnostics(diags) {
|
834
|
+
const convertedDiags = [];
|
835
|
+
diags.forEach((diag) => {
|
836
|
+
const severity = convertCategoryToSeverity(diag.category);
|
837
|
+
const rule = diag.getRule();
|
838
|
+
const vsDiag = vscode_languageserver_1.Diagnostic.create(diag.range, diag.message, severity, rule, this._serverOptions.productName);
|
839
|
+
if (diag.category === 3 /* UnusedCode */) {
|
840
|
+
vsDiag.tags = [vscode_languageserver_1.DiagnosticTag.Unnecessary];
|
841
|
+
vsDiag.severity = vscode_languageserver_1.DiagnosticSeverity.Hint;
|
842
|
+
// If the client doesn't support "unnecessary" tags, don't report unused code.
|
843
|
+
if (!this.client.supportsUnnecessaryDiagnosticTag) {
|
844
|
+
return;
|
845
|
+
}
|
846
|
+
}
|
847
|
+
else if (diag.category === 4 /* Deprecated */) {
|
848
|
+
vsDiag.tags = [vscode_languageserver_1.DiagnosticTag.Deprecated];
|
849
|
+
vsDiag.severity = vscode_languageserver_1.DiagnosticSeverity.Hint;
|
850
|
+
// If the client doesn't support "deprecated" tags, don't report.
|
851
|
+
if (!this.client.supportsDeprecatedDiagnosticTag) {
|
852
|
+
return;
|
853
|
+
}
|
854
|
+
}
|
855
|
+
if (rule) {
|
856
|
+
const ruleDocUrl = this.getDocumentationUrlForDiagnosticRule(rule);
|
857
|
+
if (ruleDocUrl) {
|
858
|
+
vsDiag.codeDescription = {
|
859
|
+
href: ruleDocUrl,
|
860
|
+
};
|
861
|
+
}
|
862
|
+
}
|
863
|
+
const relatedInfo = diag.getRelatedInfo();
|
864
|
+
if (relatedInfo.length > 0) {
|
865
|
+
vsDiag.relatedInformation = relatedInfo
|
866
|
+
.filter((info) => !this.fs.isInZipOrEgg(info.filePath))
|
867
|
+
.map((info) => vscode_languageserver_1.DiagnosticRelatedInformation.create(vscode_languageserver_1.Location.create((0, pathUtils_1.convertPathToUri)(this.fs, info.filePath), info.range), info.message));
|
868
|
+
}
|
869
|
+
convertedDiags.push(vsDiag);
|
870
|
+
});
|
871
|
+
function convertCategoryToSeverity(category) {
|
872
|
+
switch (category) {
|
873
|
+
case 0 /* Error */:
|
874
|
+
return vscode_languageserver_1.DiagnosticSeverity.Error;
|
875
|
+
case 1 /* Warning */:
|
876
|
+
return vscode_languageserver_1.DiagnosticSeverity.Warning;
|
877
|
+
case 2 /* Information */:
|
878
|
+
return vscode_languageserver_1.DiagnosticSeverity.Information;
|
879
|
+
case 3 /* UnusedCode */:
|
880
|
+
case 4 /* Deprecated */:
|
881
|
+
return vscode_languageserver_1.DiagnosticSeverity.Hint;
|
882
|
+
}
|
883
|
+
}
|
884
|
+
return convertedDiags;
|
885
|
+
}
|
886
|
+
recordUserInteractionTime() {
|
887
|
+
// Tell all of the services that the user is actively
|
888
|
+
// interacting with one or more editors, so they should
|
889
|
+
// back off from performing any work.
|
890
|
+
this._workspaceMap.forEach((workspace) => {
|
891
|
+
workspace.serviceInstance.recordUserInteractionTime();
|
892
|
+
});
|
893
|
+
}
|
894
|
+
getDocumentationUrlForDiagnosticRule(rule) {
|
895
|
+
// For now, return the same URL for all rules. We can separate these
|
896
|
+
// in the future.
|
897
|
+
return 'https://github.com/microsoft/pyright/blob/main/docs/configuration.md';
|
898
|
+
}
|
899
|
+
// Expands certain predefined variables supported within VS Code settings.
|
900
|
+
// Ideally, VS Code would provide an API for doing this expansion, but
|
901
|
+
// it doesn't. We'll handle the most common variables here as a convenience.
|
902
|
+
expandPathVariables(rootPath, value) {
|
903
|
+
const regexp = /\$\{(.*?)\}/g;
|
904
|
+
return value.replace(regexp, (match, name) => {
|
905
|
+
const trimmedName = name.trim();
|
906
|
+
if (trimmedName === 'workspaceFolder') {
|
907
|
+
return rootPath;
|
908
|
+
}
|
909
|
+
if (trimmedName === 'env:HOME' && process.env.HOME !== undefined) {
|
910
|
+
return process.env.HOME;
|
911
|
+
}
|
912
|
+
if (trimmedName === 'env:USERNAME' && process.env.USERNAME !== undefined) {
|
913
|
+
return process.env.USERNAME;
|
914
|
+
}
|
915
|
+
if (trimmedName === 'env:VIRTUAL_ENV' && process.env.VIRTUAL_ENV !== undefined) {
|
916
|
+
return process.env.VIRTUAL_ENV;
|
917
|
+
}
|
918
|
+
return match;
|
919
|
+
});
|
920
|
+
}
|
921
|
+
}
|
922
|
+
exports.LanguageServerBase = LanguageServerBase;
|
923
|
+
//# sourceMappingURL=languageServerBase.js.map
|