@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,1197 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* service.ts
|
4
|
+
* Copyright (c) Microsoft Corporation.
|
5
|
+
* Licensed under the MIT license.
|
6
|
+
* Author: Eric Traut
|
7
|
+
*
|
8
|
+
* A persistent service that is able to analyze a collection of
|
9
|
+
* Python files.
|
10
|
+
*/
|
11
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
12
|
+
if (k2 === undefined) k2 = k;
|
13
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
14
|
+
}) : (function(o, m, k, k2) {
|
15
|
+
if (k2 === undefined) k2 = k;
|
16
|
+
o[k2] = m[k];
|
17
|
+
}));
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
20
|
+
}) : function(o, v) {
|
21
|
+
o["default"] = v;
|
22
|
+
});
|
23
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
24
|
+
if (mod && mod.__esModule) return mod;
|
25
|
+
var result = {};
|
26
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
27
|
+
__setModuleDefault(result, mod);
|
28
|
+
return result;
|
29
|
+
};
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
31
|
+
exports.AnalyzerService = exports.pyprojectTomlName = exports.configFileNames = void 0;
|
32
|
+
const TOML = __importStar(require("@iarna/toml"));
|
33
|
+
const JSONC = __importStar(require("jsonc-parser"));
|
34
|
+
const cancellationUtils_1 = require("../common/cancellationUtils");
|
35
|
+
const configOptions_1 = require("../common/configOptions");
|
36
|
+
const console_1 = require("../common/console");
|
37
|
+
const fileSystem_1 = require("../common/fileSystem");
|
38
|
+
const host_1 = require("../common/host");
|
39
|
+
const pathUtils_1 = require("../common/pathUtils");
|
40
|
+
const timing_1 = require("../common/timing");
|
41
|
+
const backgroundAnalysisProgram_1 = require("./backgroundAnalysisProgram");
|
42
|
+
const importResolver_1 = require("./importResolver");
|
43
|
+
const pythonPathUtils_1 = require("./pythonPathUtils");
|
44
|
+
exports.configFileNames = ['pyrightconfig.json'];
|
45
|
+
exports.pyprojectTomlName = 'pyproject.toml';
|
46
|
+
// How long since the last user activity should we wait until running
|
47
|
+
// the analyzer on any files that have not yet been analyzed?
|
48
|
+
const _userActivityBackoffTimeInMs = 250;
|
49
|
+
const _gitDirectory = (0, pathUtils_1.normalizeSlashes)('/.git/');
|
50
|
+
const _includeFileRegex = /\.pyi?$/;
|
51
|
+
// How long since the last library activity should we wait until
|
52
|
+
// re-analyzing the libraries? (10min)
|
53
|
+
const _libraryActivityBackoffTimeInMs = 60 * 1000 * 10;
|
54
|
+
class AnalyzerService {
|
55
|
+
constructor(instanceName, fs, console, hostFactory, importResolverFactory, configOptions, extension, backgroundAnalysis, maxAnalysisTime, backgroundAnalysisProgramFactory, cancellationProvider) {
|
56
|
+
this._typeStubTargetIsSingleFile = false;
|
57
|
+
this._requireTrackedFileUpdate = true;
|
58
|
+
this._lastUserInteractionTime = Date.now();
|
59
|
+
this._disposed = false;
|
60
|
+
this._instanceName = instanceName;
|
61
|
+
this._console = console || new console_1.StandardConsole();
|
62
|
+
this._executionRootPath = '';
|
63
|
+
this._extension = extension;
|
64
|
+
this._importResolverFactory = importResolverFactory || AnalyzerService.createImportResolver;
|
65
|
+
this._maxAnalysisTimeInForeground = maxAnalysisTime;
|
66
|
+
this._backgroundAnalysisProgramFactory = backgroundAnalysisProgramFactory;
|
67
|
+
this._cancellationProvider = cancellationProvider !== null && cancellationProvider !== void 0 ? cancellationProvider : new cancellationUtils_1.DefaultCancellationProvider();
|
68
|
+
this._hostFactory = hostFactory !== null && hostFactory !== void 0 ? hostFactory : (() => new host_1.NoAccessHost());
|
69
|
+
configOptions = configOptions !== null && configOptions !== void 0 ? configOptions : new configOptions_1.ConfigOptions(process.cwd());
|
70
|
+
const importResolver = this._importResolverFactory(fs, configOptions, this._hostFactory());
|
71
|
+
this._backgroundAnalysisProgram =
|
72
|
+
backgroundAnalysisProgramFactory !== undefined
|
73
|
+
? backgroundAnalysisProgramFactory(this._console, configOptions, importResolver, this._extension, backgroundAnalysis, this._maxAnalysisTimeInForeground)
|
74
|
+
: new backgroundAnalysisProgram_1.BackgroundAnalysisProgram(this._console, configOptions, importResolver, this._extension, backgroundAnalysis, this._maxAnalysisTimeInForeground);
|
75
|
+
}
|
76
|
+
clone(instanceName, backgroundAnalysis, fs) {
|
77
|
+
const service = new AnalyzerService(instanceName, fs !== null && fs !== void 0 ? fs : this._fs, this._console, this._hostFactory, this._importResolverFactory, this._backgroundAnalysisProgram.configOptions, this._extension, backgroundAnalysis, this._maxAnalysisTimeInForeground, this._backgroundAnalysisProgramFactory, this._cancellationProvider);
|
78
|
+
// Make sure we keep editor content (open file) which could be different than one in the file system.
|
79
|
+
for (const fileInfo of this.backgroundAnalysisProgram.program.getOpened()) {
|
80
|
+
const version = fileInfo.sourceFile.getClientVersion();
|
81
|
+
if (version !== undefined) {
|
82
|
+
service.setFileOpened(fileInfo.sourceFile.getFilePath(), version, fileInfo.sourceFile.getOpenFileContents());
|
83
|
+
}
|
84
|
+
}
|
85
|
+
return service;
|
86
|
+
}
|
87
|
+
dispose() {
|
88
|
+
this._disposed = true;
|
89
|
+
this._removeSourceFileWatchers();
|
90
|
+
this._removeConfigFileWatcher();
|
91
|
+
this._removeLibraryFileWatcher();
|
92
|
+
this._clearReloadConfigTimer();
|
93
|
+
this._clearReanalysisTimer();
|
94
|
+
this._clearLibraryReanalysisTimer();
|
95
|
+
}
|
96
|
+
get librarySearchPathsToWatch() {
|
97
|
+
return this._librarySearchPathsToWatch;
|
98
|
+
}
|
99
|
+
get backgroundAnalysisProgram() {
|
100
|
+
return this._backgroundAnalysisProgram;
|
101
|
+
}
|
102
|
+
static createImportResolver(fs, options, host) {
|
103
|
+
return new importResolver_1.ImportResolver(fs, options, host);
|
104
|
+
}
|
105
|
+
setCompletionCallback(callback) {
|
106
|
+
this._onCompletionCallback = callback;
|
107
|
+
this._backgroundAnalysisProgram.setCompletionCallback(callback);
|
108
|
+
}
|
109
|
+
setOptions(commandLineOptions) {
|
110
|
+
this._commandLineOptions = commandLineOptions;
|
111
|
+
const host = this._hostFactory();
|
112
|
+
const configOptions = this._getConfigOptions(host, commandLineOptions);
|
113
|
+
if (configOptions.pythonPath) {
|
114
|
+
// Make sure we have default python environment set.
|
115
|
+
configOptions.ensureDefaultPythonVersion(host, this._console);
|
116
|
+
}
|
117
|
+
configOptions.ensureDefaultPythonPlatform(host, this._console);
|
118
|
+
this._backgroundAnalysisProgram.setConfigOptions(configOptions);
|
119
|
+
this._executionRootPath = (0, pathUtils_1.normalizePath)((0, pathUtils_1.combinePaths)(commandLineOptions.executionRoot, configOptions.projectRoot));
|
120
|
+
this._applyConfigOptions(host);
|
121
|
+
}
|
122
|
+
isTracked(filePath) {
|
123
|
+
for (const includeSpec of this._configOptions.include) {
|
124
|
+
if (this._matchIncludeFileSpec(includeSpec.regExp, this._configOptions.exclude, filePath)) {
|
125
|
+
return true;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
return false;
|
129
|
+
}
|
130
|
+
setFileOpened(path, version, contents, ipythonMode = false, chainedFilePath) {
|
131
|
+
this._backgroundAnalysisProgram.setFileOpened(path, version, contents, {
|
132
|
+
isTracked: this.isTracked(path),
|
133
|
+
ipythonMode,
|
134
|
+
chainedFilePath,
|
135
|
+
});
|
136
|
+
this._scheduleReanalysis(/* requireTrackedFileUpdate */ false);
|
137
|
+
}
|
138
|
+
updateChainedFilePath(path, chainedFilePath) {
|
139
|
+
this._backgroundAnalysisProgram.updateChainedFilePath(path, chainedFilePath);
|
140
|
+
this._scheduleReanalysis(/*requireTrackedFileUpdate*/ false);
|
141
|
+
}
|
142
|
+
updateOpenFileContents(path, version, contents, ipythonMode = false, chainedFilePath) {
|
143
|
+
this._backgroundAnalysisProgram.updateOpenFileContents(path, version, contents, {
|
144
|
+
isTracked: this.isTracked(path),
|
145
|
+
ipythonMode,
|
146
|
+
chainedFilePath,
|
147
|
+
});
|
148
|
+
this._scheduleReanalysis(/* requireTrackedFileUpdate */ false);
|
149
|
+
}
|
150
|
+
test_setIndexing(workspaceIndices, libraryIndices) {
|
151
|
+
this._backgroundAnalysisProgram.test_setIndexing(workspaceIndices, libraryIndices);
|
152
|
+
}
|
153
|
+
startIndexing(indexOptions) {
|
154
|
+
this._backgroundAnalysisProgram.startIndexing(indexOptions);
|
155
|
+
}
|
156
|
+
setFileClosed(path) {
|
157
|
+
this._backgroundAnalysisProgram.setFileClosed(path);
|
158
|
+
this._scheduleReanalysis(/* requireTrackedFileUpdate */ false);
|
159
|
+
}
|
160
|
+
getParseResult(path) {
|
161
|
+
var _a;
|
162
|
+
return (_a = this._program.getBoundSourceFile(path)) === null || _a === void 0 ? void 0 : _a.getParseResults();
|
163
|
+
}
|
164
|
+
getTextOnRange(filePath, range, token) {
|
165
|
+
return this._program.getTextOnRange(filePath, range, token);
|
166
|
+
}
|
167
|
+
getAutoImports(filePath, range, similarityLimit, nameMap, lazyEdit, allowVariableInAll, token) {
|
168
|
+
return this._program.getAutoImports(filePath, range, similarityLimit, nameMap, this._backgroundAnalysisProgram.getIndexing(filePath), lazyEdit, allowVariableInAll, token);
|
169
|
+
}
|
170
|
+
getDefinitionForPosition(filePath, position, filter, token) {
|
171
|
+
return this._program.getDefinitionsForPosition(filePath, position, filter, token);
|
172
|
+
}
|
173
|
+
getTypeDefinitionForPosition(filePath, position, token) {
|
174
|
+
return this._program.getTypeDefinitionsForPosition(filePath, position, token);
|
175
|
+
}
|
176
|
+
reportReferencesForPosition(filePath, position, includeDeclaration, reporter, token) {
|
177
|
+
this._program.reportReferencesForPosition(filePath, position, includeDeclaration, reporter, token);
|
178
|
+
}
|
179
|
+
addSymbolsForDocument(filePath, symbolList, token) {
|
180
|
+
this._program.addSymbolsForDocument(filePath, symbolList, token);
|
181
|
+
}
|
182
|
+
reportSymbolsForWorkspace(query, reporter, token) {
|
183
|
+
this._program.reportSymbolsForWorkspace(query, reporter, token);
|
184
|
+
}
|
185
|
+
getHoverForPosition(filePath, position, format, token) {
|
186
|
+
return this._program.getHoverForPosition(filePath, position, format, token);
|
187
|
+
}
|
188
|
+
getDocumentHighlight(filePath, position, token) {
|
189
|
+
return this._program.getDocumentHighlight(filePath, position, token);
|
190
|
+
}
|
191
|
+
getSignatureHelpForPosition(filePath, position, format, token) {
|
192
|
+
return this._program.getSignatureHelpForPosition(filePath, position, format, token);
|
193
|
+
}
|
194
|
+
getCompletionsForPosition(filePath, position, workspacePath, options, nameMap, token) {
|
195
|
+
return this._program.getCompletionsForPosition(filePath, position, workspacePath, options, nameMap, this._backgroundAnalysisProgram.getIndexing(filePath), token);
|
196
|
+
}
|
197
|
+
getEvaluator() {
|
198
|
+
return this._program.evaluator;
|
199
|
+
}
|
200
|
+
resolveCompletionItem(filePath, completionItem, options, nameMap, token) {
|
201
|
+
this._program.resolveCompletionItem(filePath, completionItem, options, nameMap, this._backgroundAnalysisProgram.getIndexing(filePath), token);
|
202
|
+
}
|
203
|
+
performQuickAction(filePath, command, args, token) {
|
204
|
+
return this._program.performQuickAction(filePath, command, args, token);
|
205
|
+
}
|
206
|
+
renameModule(filePath, newFilePath, token) {
|
207
|
+
return this._program.renameModule(filePath, newFilePath, token);
|
208
|
+
}
|
209
|
+
canRenameSymbolAtPosition(filePath, position, isDefaultWorkspace, allowModuleRename, token) {
|
210
|
+
return this._program.canRenameSymbolAtPosition(filePath, position, isDefaultWorkspace, allowModuleRename, token);
|
211
|
+
}
|
212
|
+
renameSymbolAtPosition(filePath, position, newName, isDefaultWorkspace, allowModuleRename, token) {
|
213
|
+
return this._program.renameSymbolAtPosition(filePath, position, newName, isDefaultWorkspace, allowModuleRename, token);
|
214
|
+
}
|
215
|
+
getCallForPosition(filePath, position, token) {
|
216
|
+
return this._program.getCallForPosition(filePath, position, token);
|
217
|
+
}
|
218
|
+
getIncomingCallsForPosition(filePath, position, token) {
|
219
|
+
return this._program.getIncomingCallsForPosition(filePath, position, token);
|
220
|
+
}
|
221
|
+
getOutgoingCallsForPosition(filePath, position, token) {
|
222
|
+
return this._program.getOutgoingCallsForPosition(filePath, position, token);
|
223
|
+
}
|
224
|
+
printStats() {
|
225
|
+
this._console.info('');
|
226
|
+
this._console.info('Analysis stats');
|
227
|
+
const boundFileCount = this._program.getFileCount();
|
228
|
+
this._console.info('Total files parsed and bound: ' + boundFileCount.toString());
|
229
|
+
const checkedFileCount = this._program.getUserFileCount();
|
230
|
+
this._console.info('Total files checked: ' + checkedFileCount.toString());
|
231
|
+
}
|
232
|
+
printDetailedAnalysisTimes() {
|
233
|
+
this._program.printDetailedAnalysisTimes();
|
234
|
+
}
|
235
|
+
printDependencies(verbose) {
|
236
|
+
this._program.printDependencies(this._executionRootPath, verbose);
|
237
|
+
}
|
238
|
+
getDiagnosticsForRange(filePath, range, token) {
|
239
|
+
return this._backgroundAnalysisProgram.getDiagnosticsForRange(filePath, range, token);
|
240
|
+
}
|
241
|
+
getConfigOptions() {
|
242
|
+
return this._configOptions;
|
243
|
+
}
|
244
|
+
getImportResolver() {
|
245
|
+
return this._backgroundAnalysisProgram.importResolver;
|
246
|
+
}
|
247
|
+
recordUserInteractionTime() {
|
248
|
+
this._lastUserInteractionTime = Date.now();
|
249
|
+
// If we have a pending timer for reanalysis, cancel it
|
250
|
+
// and reschedule for some time in the future.
|
251
|
+
if (this._analyzeTimer) {
|
252
|
+
this._scheduleReanalysis(/* requireTrackedFileUpdate */ false);
|
253
|
+
}
|
254
|
+
}
|
255
|
+
// test only APIs
|
256
|
+
get test_program() {
|
257
|
+
return this._program;
|
258
|
+
}
|
259
|
+
test_getConfigOptions(commandLineOptions) {
|
260
|
+
return this._getConfigOptions(this._backgroundAnalysisProgram.host, commandLineOptions);
|
261
|
+
}
|
262
|
+
test_getFileNamesFromFileSpecs() {
|
263
|
+
return this._getFileNamesFromFileSpecs();
|
264
|
+
}
|
265
|
+
// Calculates the effective options based on the command-line options,
|
266
|
+
// an optional config file, and default values.
|
267
|
+
_getConfigOptions(host, commandLineOptions) {
|
268
|
+
var _a, _b, _c;
|
269
|
+
let projectRoot = commandLineOptions.executionRoot;
|
270
|
+
let configFilePath;
|
271
|
+
let pyprojectFilePath;
|
272
|
+
if (commandLineOptions.configFilePath) {
|
273
|
+
// If the config file path was specified, determine whether it's
|
274
|
+
// a directory (in which case the default config file name is assumed)
|
275
|
+
// or a file.
|
276
|
+
configFilePath = (0, pathUtils_1.combinePaths)(commandLineOptions.executionRoot, (0, pathUtils_1.normalizePath)(commandLineOptions.configFilePath));
|
277
|
+
if (!this._fs.existsSync(configFilePath)) {
|
278
|
+
this._console.info(`Configuration file not found at ${configFilePath}.`);
|
279
|
+
configFilePath = commandLineOptions.executionRoot;
|
280
|
+
}
|
281
|
+
else {
|
282
|
+
if (configFilePath.toLowerCase().endsWith('.json')) {
|
283
|
+
projectRoot = (0, pathUtils_1.getDirectoryPath)(configFilePath);
|
284
|
+
}
|
285
|
+
else {
|
286
|
+
projectRoot = configFilePath;
|
287
|
+
configFilePath = this._findConfigFile(configFilePath);
|
288
|
+
if (!configFilePath) {
|
289
|
+
this._console.info(`Configuration file not found at ${projectRoot}.`);
|
290
|
+
}
|
291
|
+
}
|
292
|
+
}
|
293
|
+
}
|
294
|
+
else if (projectRoot) {
|
295
|
+
// In a project-based IDE like VS Code, we should assume that the
|
296
|
+
// project root directory contains the config file.
|
297
|
+
configFilePath = this._findConfigFile(projectRoot);
|
298
|
+
// If pyright is being executed from the command line, the working
|
299
|
+
// directory may be deep within a project, and we need to walk up the
|
300
|
+
// directory hierarchy to find the project root.
|
301
|
+
if (!configFilePath && !commandLineOptions.fromVsCodeExtension) {
|
302
|
+
configFilePath = this._findConfigFileHereOrUp(projectRoot);
|
303
|
+
}
|
304
|
+
if (configFilePath) {
|
305
|
+
projectRoot = (0, pathUtils_1.getDirectoryPath)(configFilePath);
|
306
|
+
}
|
307
|
+
else {
|
308
|
+
this._console.info(`No configuration file found.`);
|
309
|
+
configFilePath = undefined;
|
310
|
+
}
|
311
|
+
}
|
312
|
+
if (!configFilePath) {
|
313
|
+
// See if we can find a pyproject.toml file in this directory.
|
314
|
+
pyprojectFilePath = this._findPyprojectTomlFile(projectRoot);
|
315
|
+
if (!pyprojectFilePath && !commandLineOptions.fromVsCodeExtension) {
|
316
|
+
pyprojectFilePath = this._findPyprojectTomlFileHereOrUp(projectRoot);
|
317
|
+
}
|
318
|
+
if (pyprojectFilePath) {
|
319
|
+
projectRoot = (0, pathUtils_1.getDirectoryPath)(pyprojectFilePath);
|
320
|
+
this._console.info(`pyproject.toml file found at ${projectRoot}.`);
|
321
|
+
}
|
322
|
+
else {
|
323
|
+
this._console.info(`No pyproject.toml file found.`);
|
324
|
+
}
|
325
|
+
}
|
326
|
+
const configOptions = new configOptions_1.ConfigOptions(projectRoot, this._typeCheckingMode);
|
327
|
+
const defaultExcludes = ['**/node_modules', '**/__pycache__', '**/.*'];
|
328
|
+
if (commandLineOptions.pythonPath) {
|
329
|
+
this._console.info(`Setting pythonPath for service "${this._instanceName}": ` + `"${commandLineOptions.pythonPath}"`);
|
330
|
+
configOptions.pythonPath = commandLineOptions.pythonPath;
|
331
|
+
}
|
332
|
+
// The pythonPlatform and pythonVersion from the command-line can be overridden
|
333
|
+
// by the config file, so initialize them upfront.
|
334
|
+
configOptions.defaultPythonPlatform = commandLineOptions.pythonPlatform;
|
335
|
+
configOptions.defaultPythonVersion = commandLineOptions.pythonVersion;
|
336
|
+
configOptions.ensureDefaultExtraPaths(this._fs, commandLineOptions.autoSearchPaths || false, commandLineOptions.extraPaths);
|
337
|
+
if (commandLineOptions.fileSpecs.length > 0) {
|
338
|
+
commandLineOptions.fileSpecs.forEach((fileSpec) => {
|
339
|
+
configOptions.include.push((0, pathUtils_1.getFileSpec)(this._fs, projectRoot, fileSpec));
|
340
|
+
});
|
341
|
+
}
|
342
|
+
else if (!configFilePath) {
|
343
|
+
// If no config file was found and there are no explicit include
|
344
|
+
// paths specified, assume the caller wants to include all source
|
345
|
+
// files under the execution root path.
|
346
|
+
if (commandLineOptions.executionRoot) {
|
347
|
+
configOptions.include.push((0, pathUtils_1.getFileSpec)(this._fs, commandLineOptions.executionRoot, '.'));
|
348
|
+
// Add a few common excludes to avoid long scan times.
|
349
|
+
defaultExcludes.forEach((exclude) => {
|
350
|
+
configOptions.exclude.push((0, pathUtils_1.getFileSpec)(this._fs, commandLineOptions.executionRoot, exclude));
|
351
|
+
});
|
352
|
+
}
|
353
|
+
}
|
354
|
+
this._configFilePath = configFilePath || pyprojectFilePath;
|
355
|
+
// If we found a config file, parse it to compute the effective options.
|
356
|
+
let configJsonObj;
|
357
|
+
if (configFilePath) {
|
358
|
+
this._console.info(`Loading configuration file at ${configFilePath}`);
|
359
|
+
configJsonObj = this._parseJsonConfigFile(configFilePath);
|
360
|
+
}
|
361
|
+
else if (pyprojectFilePath) {
|
362
|
+
this._console.info(`Loading pyproject.toml file at ${pyprojectFilePath}`);
|
363
|
+
configJsonObj = this._parsePyprojectTomlFile(pyprojectFilePath);
|
364
|
+
}
|
365
|
+
if (configJsonObj) {
|
366
|
+
configOptions.initializeFromJson(configJsonObj, this._typeCheckingMode, this._console, this._fs, host, commandLineOptions.diagnosticSeverityOverrides, commandLineOptions.fileSpecs.length > 0);
|
367
|
+
const configFileDir = (0, pathUtils_1.getDirectoryPath)(this._configFilePath);
|
368
|
+
// If no include paths were provided, assume that all files within
|
369
|
+
// the project should be included.
|
370
|
+
if (configOptions.include.length === 0) {
|
371
|
+
this._console.info(`No include entries specified; assuming ${configFileDir}`);
|
372
|
+
configOptions.include.push((0, pathUtils_1.getFileSpec)(this._fs, configFileDir, '.'));
|
373
|
+
}
|
374
|
+
// If there was no explicit set of excludes, add a few common ones to avoid long scan times.
|
375
|
+
if (configOptions.exclude.length === 0) {
|
376
|
+
defaultExcludes.forEach((exclude) => {
|
377
|
+
this._console.info(`Auto-excluding ${exclude}`);
|
378
|
+
configOptions.exclude.push((0, pathUtils_1.getFileSpec)(this._fs, configFileDir, exclude));
|
379
|
+
});
|
380
|
+
if (configOptions.autoExcludeVenv === undefined) {
|
381
|
+
configOptions.autoExcludeVenv = true;
|
382
|
+
}
|
383
|
+
}
|
384
|
+
}
|
385
|
+
else {
|
386
|
+
configOptions.autoExcludeVenv = true;
|
387
|
+
configOptions.applyDiagnosticOverrides(commandLineOptions.diagnosticSeverityOverrides);
|
388
|
+
}
|
389
|
+
configOptions.analyzeUnannotatedFunctions = (_a = commandLineOptions.analyzeUnannotatedFunctions) !== null && _a !== void 0 ? _a : true;
|
390
|
+
const reportDuplicateSetting = (settingName, configValue) => {
|
391
|
+
const settingSource = commandLineOptions.fromVsCodeExtension
|
392
|
+
? 'the client settings'
|
393
|
+
: 'a command-line option';
|
394
|
+
this._console.warn(`The ${settingName} has been specified in both the config file and ` +
|
395
|
+
`${settingSource}. The value in the config file (${configValue}) ` +
|
396
|
+
`will take precedence`);
|
397
|
+
};
|
398
|
+
// Apply the command-line options if the corresponding
|
399
|
+
// item wasn't already set in the config file. Report any
|
400
|
+
// duplicates.
|
401
|
+
if (commandLineOptions.venvPath) {
|
402
|
+
if (!configOptions.venvPath) {
|
403
|
+
configOptions.venvPath = commandLineOptions.venvPath;
|
404
|
+
}
|
405
|
+
else {
|
406
|
+
reportDuplicateSetting('venvPath', configOptions.venvPath);
|
407
|
+
}
|
408
|
+
}
|
409
|
+
if (commandLineOptions.typeshedPath) {
|
410
|
+
if (!configOptions.typeshedPath) {
|
411
|
+
configOptions.typeshedPath = commandLineOptions.typeshedPath;
|
412
|
+
}
|
413
|
+
else {
|
414
|
+
reportDuplicateSetting('typeshedPath', configOptions.typeshedPath);
|
415
|
+
}
|
416
|
+
}
|
417
|
+
configOptions.verboseOutput = (_b = commandLineOptions.verboseOutput) !== null && _b !== void 0 ? _b : configOptions.verboseOutput;
|
418
|
+
configOptions.checkOnlyOpenFiles = !!commandLineOptions.checkOnlyOpenFiles;
|
419
|
+
configOptions.autoImportCompletions = !!commandLineOptions.autoImportCompletions;
|
420
|
+
configOptions.indexing = !!commandLineOptions.indexing;
|
421
|
+
configOptions.logTypeEvaluationTime = !!commandLineOptions.logTypeEvaluationTime;
|
422
|
+
configOptions.typeEvaluationTimeThreshold = commandLineOptions.typeEvaluationTimeThreshold;
|
423
|
+
// If useLibraryCodeForTypes was not specified in the config, allow the settings
|
424
|
+
// or command line to override it.
|
425
|
+
if (configOptions.useLibraryCodeForTypes === undefined) {
|
426
|
+
configOptions.useLibraryCodeForTypes = !!commandLineOptions.useLibraryCodeForTypes;
|
427
|
+
}
|
428
|
+
else if (commandLineOptions.useLibraryCodeForTypes !== undefined) {
|
429
|
+
reportDuplicateSetting('useLibraryCodeForTypes', configOptions.useLibraryCodeForTypes);
|
430
|
+
}
|
431
|
+
// If there was no stub path specified, use a default path.
|
432
|
+
if (commandLineOptions.stubPath) {
|
433
|
+
if (!configOptions.stubPath) {
|
434
|
+
configOptions.stubPath = commandLineOptions.stubPath;
|
435
|
+
}
|
436
|
+
else {
|
437
|
+
reportDuplicateSetting('stubPath', configOptions.stubPath);
|
438
|
+
}
|
439
|
+
}
|
440
|
+
else {
|
441
|
+
if (!configOptions.stubPath) {
|
442
|
+
configOptions.stubPath = (0, pathUtils_1.normalizePath)((0, pathUtils_1.combinePaths)(configOptions.projectRoot, 'typings'));
|
443
|
+
}
|
444
|
+
}
|
445
|
+
// Do some sanity checks on the specified settings and report missing
|
446
|
+
// or inconsistent information.
|
447
|
+
if (configOptions.venvPath) {
|
448
|
+
if (!this._fs.existsSync(configOptions.venvPath) || !(0, pathUtils_1.isDirectory)(this._fs, configOptions.venvPath)) {
|
449
|
+
this._console.error(`venvPath ${configOptions.venvPath} is not a valid directory.`);
|
450
|
+
}
|
451
|
+
// venvPath without venv means it won't do anything while resolveImport.
|
452
|
+
// so first, try to set venv from existing configOption if it is null. if both are null,
|
453
|
+
// then, resolveImport won't consider venv
|
454
|
+
configOptions.venv = (_c = configOptions.venv) !== null && _c !== void 0 ? _c : this._configOptions.venv;
|
455
|
+
if (configOptions.venv) {
|
456
|
+
const fullVenvPath = (0, pathUtils_1.combinePaths)(configOptions.venvPath, configOptions.venv);
|
457
|
+
if (!this._fs.existsSync(fullVenvPath) || !(0, pathUtils_1.isDirectory)(this._fs, fullVenvPath)) {
|
458
|
+
this._console.error(`venv ${configOptions.venv} subdirectory not found in venv path ${configOptions.venvPath}.`);
|
459
|
+
}
|
460
|
+
else {
|
461
|
+
const importFailureInfo = [];
|
462
|
+
if ((0, pythonPathUtils_1.findPythonSearchPaths)(this._fs, configOptions, host, importFailureInfo) === undefined) {
|
463
|
+
this._console.error(`site-packages directory cannot be located for venvPath ` +
|
464
|
+
`${configOptions.venvPath} and venv ${configOptions.venv}.`);
|
465
|
+
if (configOptions.verboseOutput) {
|
466
|
+
importFailureInfo.forEach((diag) => {
|
467
|
+
this._console.error(` ${diag}`);
|
468
|
+
});
|
469
|
+
}
|
470
|
+
}
|
471
|
+
}
|
472
|
+
}
|
473
|
+
}
|
474
|
+
// Is there a reference to a venv? If so, there needs to be a valid venvPath.
|
475
|
+
if (configOptions.venv) {
|
476
|
+
if (!configOptions.venvPath) {
|
477
|
+
this._console.warn(`venvPath not specified, so venv settings will be ignored.`);
|
478
|
+
}
|
479
|
+
}
|
480
|
+
if (configOptions.typeshedPath) {
|
481
|
+
if (!this._fs.existsSync(configOptions.typeshedPath) ||
|
482
|
+
!(0, pathUtils_1.isDirectory)(this._fs, configOptions.typeshedPath)) {
|
483
|
+
this._console.error(`typeshedPath ${configOptions.typeshedPath} is not a valid directory.`);
|
484
|
+
}
|
485
|
+
}
|
486
|
+
if (configOptions.stubPath) {
|
487
|
+
if (!this._fs.existsSync(configOptions.stubPath) || !(0, pathUtils_1.isDirectory)(this._fs, configOptions.stubPath)) {
|
488
|
+
this._console.warn(`stubPath ${configOptions.stubPath} is not a valid directory.`);
|
489
|
+
}
|
490
|
+
}
|
491
|
+
return configOptions;
|
492
|
+
}
|
493
|
+
writeTypeStub(token) {
|
494
|
+
var _a;
|
495
|
+
const typingsSubdirPath = this._getTypeStubFolder();
|
496
|
+
this._program.writeTypeStub((_a = this._typeStubTargetPath) !== null && _a !== void 0 ? _a : '', this._typeStubTargetIsSingleFile, typingsSubdirPath, token);
|
497
|
+
}
|
498
|
+
writeTypeStubInBackground(token) {
|
499
|
+
var _a;
|
500
|
+
const typingsSubdirPath = this._getTypeStubFolder();
|
501
|
+
return this._backgroundAnalysisProgram.writeTypeStub((_a = this._typeStubTargetPath) !== null && _a !== void 0 ? _a : '', this._typeStubTargetIsSingleFile, typingsSubdirPath, token);
|
502
|
+
}
|
503
|
+
// This is called after a new type stub has been created. It allows
|
504
|
+
// us to invalidate caches and force reanalysis of files that potentially
|
505
|
+
// are affected by the appearance of a new type stub.
|
506
|
+
invalidateAndForceReanalysis(rebuildUserFileIndexing = true, rebuildLibraryIndexing = true, updateTrackedFileList = false) {
|
507
|
+
if (updateTrackedFileList) {
|
508
|
+
this._updateTrackedFileList(/* markFilesDirtyUnconditionally */ false);
|
509
|
+
}
|
510
|
+
// Mark all files with one or more errors dirty.
|
511
|
+
this._backgroundAnalysisProgram.invalidateAndForceReanalysis(rebuildUserFileIndexing, rebuildLibraryIndexing);
|
512
|
+
}
|
513
|
+
// Forces the service to stop all analysis, discard all its caches,
|
514
|
+
// and research for files.
|
515
|
+
restart() {
|
516
|
+
this._applyConfigOptions(this._hostFactory());
|
517
|
+
this._backgroundAnalysisProgram.restart();
|
518
|
+
}
|
519
|
+
get _fs() {
|
520
|
+
return this._backgroundAnalysisProgram.importResolver.fileSystem;
|
521
|
+
}
|
522
|
+
get _program() {
|
523
|
+
return this._backgroundAnalysisProgram.program;
|
524
|
+
}
|
525
|
+
get _configOptions() {
|
526
|
+
return this._backgroundAnalysisProgram.configOptions;
|
527
|
+
}
|
528
|
+
get _watchForSourceChanges() {
|
529
|
+
var _a;
|
530
|
+
return !!((_a = this._commandLineOptions) === null || _a === void 0 ? void 0 : _a.watchForSourceChanges);
|
531
|
+
}
|
532
|
+
get _watchForLibraryChanges() {
|
533
|
+
var _a;
|
534
|
+
return !!((_a = this._commandLineOptions) === null || _a === void 0 ? void 0 : _a.watchForLibraryChanges);
|
535
|
+
}
|
536
|
+
get _watchForConfigChanges() {
|
537
|
+
var _a;
|
538
|
+
return !!((_a = this._commandLineOptions) === null || _a === void 0 ? void 0 : _a.watchForConfigChanges);
|
539
|
+
}
|
540
|
+
get _typeCheckingMode() {
|
541
|
+
var _a;
|
542
|
+
return (_a = this._commandLineOptions) === null || _a === void 0 ? void 0 : _a.typeCheckingMode;
|
543
|
+
}
|
544
|
+
get _verboseOutput() {
|
545
|
+
return !!this._configOptions.verboseOutput;
|
546
|
+
}
|
547
|
+
get _typeStubTargetImportName() {
|
548
|
+
var _a;
|
549
|
+
return (_a = this._commandLineOptions) === null || _a === void 0 ? void 0 : _a.typeStubTargetImportName;
|
550
|
+
}
|
551
|
+
_getTypeStubFolder() {
|
552
|
+
const stubPath = this._configOptions.stubPath;
|
553
|
+
if (!this._typeStubTargetPath || !this._typeStubTargetImportName) {
|
554
|
+
const errMsg = `Import '${this._typeStubTargetImportName}'` + ` could not be resolved`;
|
555
|
+
this._console.error(errMsg);
|
556
|
+
throw new Error(errMsg);
|
557
|
+
}
|
558
|
+
if (!stubPath) {
|
559
|
+
// We should never get here because we always generate a
|
560
|
+
// default typings path if none was specified.
|
561
|
+
const errMsg = 'No typings path was specified';
|
562
|
+
this._console.info(errMsg);
|
563
|
+
throw new Error(errMsg);
|
564
|
+
}
|
565
|
+
const typeStubInputTargetParts = this._typeStubTargetImportName.split('.');
|
566
|
+
if (typeStubInputTargetParts[0].length === 0) {
|
567
|
+
// We should never get here because the import resolution
|
568
|
+
// would have failed.
|
569
|
+
const errMsg = `Import '${this._typeStubTargetImportName}'` + ` could not be resolved`;
|
570
|
+
this._console.error(errMsg);
|
571
|
+
throw new Error(errMsg);
|
572
|
+
}
|
573
|
+
try {
|
574
|
+
// Generate a new typings directory if necessary.
|
575
|
+
if (!this._fs.existsSync(stubPath)) {
|
576
|
+
this._fs.mkdirSync(stubPath);
|
577
|
+
}
|
578
|
+
}
|
579
|
+
catch (e) {
|
580
|
+
const errMsg = `Could not create typings directory '${stubPath}'`;
|
581
|
+
this._console.error(errMsg);
|
582
|
+
throw new Error(errMsg);
|
583
|
+
}
|
584
|
+
// Generate a typings subdirectory hierarchy.
|
585
|
+
const typingsSubdirPath = (0, pathUtils_1.combinePaths)(stubPath, typeStubInputTargetParts[0]);
|
586
|
+
const typingsSubdirHierarchy = (0, pathUtils_1.combinePaths)(stubPath, ...typeStubInputTargetParts);
|
587
|
+
try {
|
588
|
+
// Generate a new typings subdirectory if necessary.
|
589
|
+
if (!this._fs.existsSync(typingsSubdirHierarchy)) {
|
590
|
+
(0, pathUtils_1.makeDirectories)(this._fs, typingsSubdirHierarchy, stubPath);
|
591
|
+
}
|
592
|
+
}
|
593
|
+
catch (e) {
|
594
|
+
const errMsg = `Could not create typings subdirectory '${typingsSubdirHierarchy}'`;
|
595
|
+
this._console.error(errMsg);
|
596
|
+
throw new Error(errMsg);
|
597
|
+
}
|
598
|
+
return typingsSubdirPath;
|
599
|
+
}
|
600
|
+
_findConfigFileHereOrUp(searchPath) {
|
601
|
+
return (0, pathUtils_1.forEachAncestorDirectory)(searchPath, (ancestor) => this._findConfigFile(ancestor));
|
602
|
+
}
|
603
|
+
_findConfigFile(searchPath) {
|
604
|
+
for (const name of exports.configFileNames) {
|
605
|
+
const fileName = (0, pathUtils_1.combinePaths)(searchPath, name);
|
606
|
+
if (this._fs.existsSync(fileName)) {
|
607
|
+
return fileName;
|
608
|
+
}
|
609
|
+
}
|
610
|
+
return undefined;
|
611
|
+
}
|
612
|
+
_findPyprojectTomlFileHereOrUp(searchPath) {
|
613
|
+
return (0, pathUtils_1.forEachAncestorDirectory)(searchPath, (ancestor) => this._findPyprojectTomlFile(ancestor));
|
614
|
+
}
|
615
|
+
_findPyprojectTomlFile(searchPath) {
|
616
|
+
const fileName = (0, pathUtils_1.combinePaths)(searchPath, exports.pyprojectTomlName);
|
617
|
+
if (this._fs.existsSync(fileName)) {
|
618
|
+
return fileName;
|
619
|
+
}
|
620
|
+
return undefined;
|
621
|
+
}
|
622
|
+
_parseJsonConfigFile(configPath) {
|
623
|
+
return this._attemptParseFile(configPath, (fileContents) => {
|
624
|
+
return JSONC.parse(fileContents);
|
625
|
+
});
|
626
|
+
}
|
627
|
+
_parsePyprojectTomlFile(pyprojectPath) {
|
628
|
+
return this._attemptParseFile(pyprojectPath, (fileContents, attemptCount) => {
|
629
|
+
try {
|
630
|
+
const configObj = TOML.parse(fileContents);
|
631
|
+
if (configObj && configObj.tool && configObj.tool.pyright) {
|
632
|
+
return configObj.tool.pyright;
|
633
|
+
}
|
634
|
+
}
|
635
|
+
catch (e) {
|
636
|
+
this._console.error(`Pyproject file parse attempt ${attemptCount} error: ${JSON.stringify(e)}`);
|
637
|
+
throw e;
|
638
|
+
}
|
639
|
+
this._console.error(`Pyproject file "${pyprojectPath}" is missing "[tool.pyright]" section.`);
|
640
|
+
return undefined;
|
641
|
+
});
|
642
|
+
}
|
643
|
+
_attemptParseFile(filePath, parseCallback) {
|
644
|
+
let fileContents = '';
|
645
|
+
let parseAttemptCount = 0;
|
646
|
+
while (true) {
|
647
|
+
// Attempt to read the file contents.
|
648
|
+
try {
|
649
|
+
fileContents = this._fs.readFileSync(filePath, 'utf8');
|
650
|
+
}
|
651
|
+
catch {
|
652
|
+
this._console.error(`Config file "${filePath}" could not be read.`);
|
653
|
+
this._reportConfigParseError();
|
654
|
+
return undefined;
|
655
|
+
}
|
656
|
+
// Attempt to parse the file.
|
657
|
+
let parseFailed = false;
|
658
|
+
try {
|
659
|
+
return parseCallback(fileContents, parseAttemptCount + 1);
|
660
|
+
}
|
661
|
+
catch (e) {
|
662
|
+
parseFailed = true;
|
663
|
+
}
|
664
|
+
if (!parseFailed) {
|
665
|
+
break;
|
666
|
+
}
|
667
|
+
// If we attempt to read the file immediately after it was saved, it
|
668
|
+
// may have been partially written when we read it, resulting in parse
|
669
|
+
// errors. We'll give it a little more time and try again.
|
670
|
+
if (parseAttemptCount++ >= 5) {
|
671
|
+
this._console.error(`Config file "${filePath}" could not be parsed. Verify that format is correct.`);
|
672
|
+
this._reportConfigParseError();
|
673
|
+
return undefined;
|
674
|
+
}
|
675
|
+
}
|
676
|
+
return undefined;
|
677
|
+
}
|
678
|
+
_getFileNamesFromFileSpecs() {
|
679
|
+
// Use a map to generate a list of unique files.
|
680
|
+
const fileMap = new Map();
|
681
|
+
timing_1.timingStats.findFilesTime.timeOperation(() => {
|
682
|
+
const matchedFiles = this._matchFiles(this._configOptions.include, this._configOptions.exclude);
|
683
|
+
for (const file of matchedFiles) {
|
684
|
+
fileMap.set(file, file);
|
685
|
+
}
|
686
|
+
});
|
687
|
+
return [...fileMap.values()];
|
688
|
+
}
|
689
|
+
// If markFilesDirtyUnconditionally is true, we need to reparse
|
690
|
+
// and reanalyze all files in the program. If false, we will
|
691
|
+
// reparse and reanalyze only those files whose on-disk contents
|
692
|
+
// have changed. Unconditional dirtying is needed in the case where
|
693
|
+
// configuration options have changed.
|
694
|
+
_updateTrackedFileList(markFilesDirtyUnconditionally) {
|
695
|
+
// Are we in type stub generation mode? If so, we need to search
|
696
|
+
// for a different set of files.
|
697
|
+
if (this._typeStubTargetImportName) {
|
698
|
+
const execEnv = this._configOptions.findExecEnvironment(this._executionRootPath);
|
699
|
+
const moduleDescriptor = (0, importResolver_1.createImportedModuleDescriptor)(this._typeStubTargetImportName);
|
700
|
+
const importResult = this._backgroundAnalysisProgram.importResolver.resolveImport('', execEnv, moduleDescriptor);
|
701
|
+
if (importResult.isImportFound) {
|
702
|
+
const filesToImport = [];
|
703
|
+
// Determine the directory that contains the root package.
|
704
|
+
const finalResolvedPath = importResult.resolvedPaths[importResult.resolvedPaths.length - 1];
|
705
|
+
const isFinalPathFile = (0, pathUtils_1.isFile)(this._fs, finalResolvedPath);
|
706
|
+
const isFinalPathInitFile = isFinalPathFile && (0, pathUtils_1.stripFileExtension)((0, pathUtils_1.getFileName)(finalResolvedPath)) === '__init__';
|
707
|
+
let rootPackagePath = finalResolvedPath;
|
708
|
+
if (isFinalPathFile) {
|
709
|
+
// If the module is a __init__.pyi? file, use its parent directory instead.
|
710
|
+
rootPackagePath = (0, pathUtils_1.getDirectoryPath)(rootPackagePath);
|
711
|
+
}
|
712
|
+
for (let i = importResult.resolvedPaths.length - 2; i >= 0; i--) {
|
713
|
+
if (importResult.resolvedPaths[i]) {
|
714
|
+
rootPackagePath = importResult.resolvedPaths[i];
|
715
|
+
}
|
716
|
+
else {
|
717
|
+
// If there was no file corresponding to this portion
|
718
|
+
// of the name path, assume that it's contained
|
719
|
+
// within its parent directory.
|
720
|
+
rootPackagePath = (0, pathUtils_1.getDirectoryPath)(rootPackagePath);
|
721
|
+
}
|
722
|
+
}
|
723
|
+
if ((0, pathUtils_1.isDirectory)(this._fs, rootPackagePath)) {
|
724
|
+
this._typeStubTargetPath = rootPackagePath;
|
725
|
+
}
|
726
|
+
else if ((0, pathUtils_1.isFile)(this._fs, rootPackagePath)) {
|
727
|
+
// This can occur if there is a "dir/__init__.py" at the same level as a
|
728
|
+
// module "dir/module.py" that is specifically targeted for stub generation.
|
729
|
+
this._typeStubTargetPath = (0, pathUtils_1.getDirectoryPath)(rootPackagePath);
|
730
|
+
}
|
731
|
+
if (!finalResolvedPath) {
|
732
|
+
this._typeStubTargetIsSingleFile = false;
|
733
|
+
}
|
734
|
+
else {
|
735
|
+
filesToImport.push(finalResolvedPath);
|
736
|
+
this._typeStubTargetIsSingleFile = importResult.resolvedPaths.length === 1 && !isFinalPathInitFile;
|
737
|
+
}
|
738
|
+
// Add the implicit import paths.
|
739
|
+
importResult.filteredImplicitImports.forEach((implicitImport) => {
|
740
|
+
filesToImport.push(implicitImport.path);
|
741
|
+
});
|
742
|
+
this._backgroundAnalysisProgram.setAllowedThirdPartyImports([this._typeStubTargetImportName]);
|
743
|
+
this._backgroundAnalysisProgram.setTrackedFiles(filesToImport);
|
744
|
+
}
|
745
|
+
else {
|
746
|
+
this._console.error(`Import '${this._typeStubTargetImportName}' not found`);
|
747
|
+
}
|
748
|
+
}
|
749
|
+
else {
|
750
|
+
let fileList = [];
|
751
|
+
this._console.info(`Searching for source files`);
|
752
|
+
fileList = this._getFileNamesFromFileSpecs();
|
753
|
+
this._backgroundAnalysisProgram.setTrackedFiles(fileList);
|
754
|
+
this._backgroundAnalysisProgram.markAllFilesDirty(markFilesDirtyUnconditionally);
|
755
|
+
if (fileList.length === 0) {
|
756
|
+
this._console.info(`No source files found.`);
|
757
|
+
}
|
758
|
+
else {
|
759
|
+
this._console.info(`Found ${fileList.length} ` + `source ${fileList.length === 1 ? 'file' : 'files'}`);
|
760
|
+
}
|
761
|
+
}
|
762
|
+
this._requireTrackedFileUpdate = false;
|
763
|
+
}
|
764
|
+
_matchFiles(include, exclude) {
|
765
|
+
const envMarkers = [['bin', 'activate'], ['Scripts', 'activate'], ['pyvenv.cfg']];
|
766
|
+
const results = [];
|
767
|
+
const startTime = Date.now();
|
768
|
+
const longOperationLimitInSec = 10;
|
769
|
+
let loggedLongOperationError = false;
|
770
|
+
const visitDirectoryUnchecked = (absolutePath, includeRegExp) => {
|
771
|
+
if (!loggedLongOperationError) {
|
772
|
+
const secondsSinceStart = (Date.now() - startTime) * 0.001;
|
773
|
+
// If this is taking a long time, log an error to help the user
|
774
|
+
// diagnose and mitigate the problem.
|
775
|
+
if (secondsSinceStart >= longOperationLimitInSec) {
|
776
|
+
this._console.error(`Enumeration of workspace source files is taking longer than ${longOperationLimitInSec} seconds.\n` +
|
777
|
+
'This may be because:\n' +
|
778
|
+
'* You have opened your home directory or entire hard drive as a workspace\n' +
|
779
|
+
'* Your workspace contains a very large number of directories and files\n' +
|
780
|
+
'* Your workspace contains a symlink to a directory with many files\n' +
|
781
|
+
'* Your workspace is remote, and file enumeration is slow\n' +
|
782
|
+
'To reduce this time, open a workspace directory with fewer files ' +
|
783
|
+
'or add a pyrightconfig.json configuration file with an "exclude" section to exclude ' +
|
784
|
+
'subdirectories from your workspace. For more details, refer to ' +
|
785
|
+
'https://github.com/microsoft/pyright/blob/main/docs/configuration.md.');
|
786
|
+
loggedLongOperationError = true;
|
787
|
+
}
|
788
|
+
}
|
789
|
+
if (this._configOptions.autoExcludeVenv) {
|
790
|
+
if (envMarkers.some((f) => this._fs.existsSync((0, pathUtils_1.combinePaths)(absolutePath, ...f)))) {
|
791
|
+
this._console.info(`Auto-excluding ${absolutePath}`);
|
792
|
+
return;
|
793
|
+
}
|
794
|
+
}
|
795
|
+
const { files, directories } = (0, pathUtils_1.getFileSystemEntries)(this._fs, absolutePath);
|
796
|
+
for (const file of files) {
|
797
|
+
const filePath = (0, pathUtils_1.combinePaths)(absolutePath, file);
|
798
|
+
if (this._matchIncludeFileSpec(includeRegExp, exclude, filePath)) {
|
799
|
+
results.push(filePath);
|
800
|
+
}
|
801
|
+
}
|
802
|
+
for (const directory of directories) {
|
803
|
+
const dirPath = (0, pathUtils_1.combinePaths)(absolutePath, directory);
|
804
|
+
if (includeRegExp.test(dirPath)) {
|
805
|
+
if (!this._isInExcludePath(dirPath, exclude)) {
|
806
|
+
visitDirectory(dirPath, includeRegExp);
|
807
|
+
}
|
808
|
+
}
|
809
|
+
}
|
810
|
+
};
|
811
|
+
const seenDirs = new Set();
|
812
|
+
const visitDirectory = (absolutePath, includeRegExp) => {
|
813
|
+
const realDirPath = (0, pathUtils_1.tryRealpath)(this._fs, absolutePath);
|
814
|
+
if (!realDirPath) {
|
815
|
+
this._console.warn(`Skipping broken link "${absolutePath}"`);
|
816
|
+
return;
|
817
|
+
}
|
818
|
+
if (seenDirs.has(realDirPath)) {
|
819
|
+
this._console.warn(`Skipping recursive symlink "${absolutePath}" -> "${realDirPath}"`);
|
820
|
+
return;
|
821
|
+
}
|
822
|
+
seenDirs.add(realDirPath);
|
823
|
+
try {
|
824
|
+
visitDirectoryUnchecked(absolutePath, includeRegExp);
|
825
|
+
}
|
826
|
+
finally {
|
827
|
+
seenDirs.delete(realDirPath);
|
828
|
+
}
|
829
|
+
};
|
830
|
+
include.forEach((includeSpec) => {
|
831
|
+
if (!this._isInExcludePath(includeSpec.wildcardRoot, exclude)) {
|
832
|
+
let foundFileSpec = false;
|
833
|
+
let isFileIncluded = true;
|
834
|
+
const stat = (0, pathUtils_1.tryStat)(this._fs, includeSpec.wildcardRoot);
|
835
|
+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
|
836
|
+
if (this._shouldIncludeFile(includeSpec.wildcardRoot)) {
|
837
|
+
results.push(includeSpec.wildcardRoot);
|
838
|
+
}
|
839
|
+
else {
|
840
|
+
isFileIncluded = false;
|
841
|
+
}
|
842
|
+
foundFileSpec = true;
|
843
|
+
}
|
844
|
+
else if (stat === null || stat === void 0 ? void 0 : stat.isDirectory()) {
|
845
|
+
visitDirectory(includeSpec.wildcardRoot, includeSpec.regExp);
|
846
|
+
foundFileSpec = true;
|
847
|
+
}
|
848
|
+
if (!foundFileSpec) {
|
849
|
+
this._console.error(`File or directory "${includeSpec.wildcardRoot}" does not exist.`);
|
850
|
+
}
|
851
|
+
else if (!isFileIncluded) {
|
852
|
+
this._console.error(`File "${includeSpec.wildcardRoot}" is not a Python source file.`);
|
853
|
+
}
|
854
|
+
}
|
855
|
+
});
|
856
|
+
return results;
|
857
|
+
}
|
858
|
+
_removeSourceFileWatchers() {
|
859
|
+
if (this._sourceFileWatcher) {
|
860
|
+
this._sourceFileWatcher.close();
|
861
|
+
this._sourceFileWatcher = undefined;
|
862
|
+
}
|
863
|
+
}
|
864
|
+
_updateSourceFileWatchers() {
|
865
|
+
this._removeSourceFileWatchers();
|
866
|
+
if (!this._watchForSourceChanges) {
|
867
|
+
return;
|
868
|
+
}
|
869
|
+
if (this._configOptions.include.length > 0) {
|
870
|
+
const fileList = this._configOptions.include.map((spec) => {
|
871
|
+
return (0, pathUtils_1.combinePaths)(this._executionRootPath, spec.wildcardRoot);
|
872
|
+
});
|
873
|
+
try {
|
874
|
+
if (this._verboseOutput) {
|
875
|
+
this._console.info(`Adding fs watcher for directories:\n ${fileList.join('\n')}`);
|
876
|
+
}
|
877
|
+
const isIgnored = (0, fileSystem_1.ignoredWatchEventFunction)(fileList);
|
878
|
+
this._sourceFileWatcher = this._fs.createFileSystemWatcher(fileList, (event, path) => {
|
879
|
+
if (!path) {
|
880
|
+
return;
|
881
|
+
}
|
882
|
+
if (this._verboseOutput) {
|
883
|
+
this._console.info(`SourceFile: Received fs event '${event}' for path '${path}'`);
|
884
|
+
}
|
885
|
+
if (isIgnored(path)) {
|
886
|
+
return;
|
887
|
+
}
|
888
|
+
// Wholesale ignore events that appear to be from tmp file / .git modification.
|
889
|
+
if (path.endsWith('.tmp') || path.endsWith('.git') || path.includes(_gitDirectory)) {
|
890
|
+
return;
|
891
|
+
}
|
892
|
+
const eventInfo = getEventInfo(this._fs, this._console, this._program, event, path);
|
893
|
+
if (!eventInfo) {
|
894
|
+
// no-op event, return.
|
895
|
+
return;
|
896
|
+
}
|
897
|
+
// For file change, we only care python file change.
|
898
|
+
if (eventInfo.isFile &&
|
899
|
+
(!(0, pathUtils_1.hasPythonExtension)(path) || isTemporaryFile(path) || !this.isTracked(path))) {
|
900
|
+
return;
|
901
|
+
}
|
902
|
+
if (eventInfo.isFile && (eventInfo.event === 'change' || eventInfo.event === 'unlink')) {
|
903
|
+
this._backgroundAnalysisProgram.markFilesDirty([path], /* evenIfContentsAreSame */ false);
|
904
|
+
this._scheduleReanalysis(/* requireTrackedFileUpdate */ false);
|
905
|
+
}
|
906
|
+
else {
|
907
|
+
// Added files or folder changes impact imports,
|
908
|
+
// clear the import resolver cache and reanalyze everything.
|
909
|
+
//
|
910
|
+
// Here we don't need to rebuild any indexing since this kind of change can't affect
|
911
|
+
// indices. For library, since the changes are on workspace files, it won't affect library
|
912
|
+
// indices. For user file, since user file indices don't contains import alias symbols,
|
913
|
+
// it won't affect those indices. we only need to rebuild user file indices when symbols
|
914
|
+
// defined in the file are changed. ex) user modified the file.
|
915
|
+
// Newly added file will be scanned since it doesn't have existing indices.
|
916
|
+
this.invalidateAndForceReanalysis(
|
917
|
+
/* rebuildUserFileIndexing */ false,
|
918
|
+
/* rebuildLibraryIndexing */ false);
|
919
|
+
this._scheduleReanalysis(/* requireTrackedFileUpdate */ true);
|
920
|
+
}
|
921
|
+
});
|
922
|
+
}
|
923
|
+
catch {
|
924
|
+
this._console.error(`Exception caught when installing fs watcher for:\n ${fileList.join('\n')}`);
|
925
|
+
}
|
926
|
+
}
|
927
|
+
function isTemporaryFile(path) {
|
928
|
+
// Determine if this is an add or delete event related to a temporary
|
929
|
+
// file. Some tools (like auto-formatters) create temporary files
|
930
|
+
// alongside the original file and name them "x.py.<temp-id>.py" where
|
931
|
+
// <temp-id> is a 32-character random string of hex digits. We don't
|
932
|
+
// want these events to trigger a full reanalysis.
|
933
|
+
const fileName = (0, pathUtils_1.getFileName)(path);
|
934
|
+
const fileNameSplit = fileName.split('.');
|
935
|
+
if (fileNameSplit.length === 4) {
|
936
|
+
if (fileNameSplit[3] === fileNameSplit[1] && fileNameSplit[2].length === 32) {
|
937
|
+
return true;
|
938
|
+
}
|
939
|
+
}
|
940
|
+
return false;
|
941
|
+
}
|
942
|
+
function getEventInfo(fs, console, program, event, path) {
|
943
|
+
// Due to the way we implemented file watcher, we will only get 2 events; 'add' and 'change'.
|
944
|
+
// Here, we will convert those 2 to 3 events. 'add', 'change' and 'unlink';
|
945
|
+
const stats = (0, pathUtils_1.tryStat)(fs, path);
|
946
|
+
if (event === 'add') {
|
947
|
+
if (!stats) {
|
948
|
+
// If we are told that the path is added, but if we can't access it, then consider it as already deleted.
|
949
|
+
// there is nothing we need to do.
|
950
|
+
return undefined;
|
951
|
+
}
|
952
|
+
return { event, isFile: stats.isFile() };
|
953
|
+
}
|
954
|
+
if (event === 'change') {
|
955
|
+
// If we got 'change', but can't access the path, then we consider it as delete.
|
956
|
+
if (!stats) {
|
957
|
+
// See whether it is a file that got deleted.
|
958
|
+
const isFile = !!program.getSourceFile(path);
|
959
|
+
// If not, check whether it is a part of the workspace at all.
|
960
|
+
if (!isFile && !program.containsSourceFileIn(path)) {
|
961
|
+
// There is no source file under the given path. There is nothing we need to do.
|
962
|
+
return undefined;
|
963
|
+
}
|
964
|
+
return { event: 'unlink', isFile };
|
965
|
+
}
|
966
|
+
return { event, isFile: stats.isFile() };
|
967
|
+
}
|
968
|
+
// We have unknown event.
|
969
|
+
console.warn(`Received unknown file change event: '${event}' for '${path}'`);
|
970
|
+
return undefined;
|
971
|
+
}
|
972
|
+
}
|
973
|
+
_removeLibraryFileWatcher() {
|
974
|
+
if (this._libraryFileWatcher) {
|
975
|
+
this._libraryFileWatcher.close();
|
976
|
+
this._libraryFileWatcher = undefined;
|
977
|
+
}
|
978
|
+
}
|
979
|
+
_updateLibraryFileWatcher() {
|
980
|
+
this._removeLibraryFileWatcher();
|
981
|
+
if (!this._watchForLibraryChanges) {
|
982
|
+
return;
|
983
|
+
}
|
984
|
+
// Watch the library paths for package install/uninstall.
|
985
|
+
const importFailureInfo = [];
|
986
|
+
this._librarySearchPathsToWatch = (0, pythonPathUtils_1.findPythonSearchPaths)(this._fs, this._backgroundAnalysisProgram.configOptions, this._backgroundAnalysisProgram.host, importFailureInfo, true, this._executionRootPath);
|
987
|
+
const watchList = this._librarySearchPathsToWatch;
|
988
|
+
if (watchList && watchList.length > 0) {
|
989
|
+
try {
|
990
|
+
if (this._verboseOutput) {
|
991
|
+
this._console.info(`Adding fs watcher for library directories:\n ${watchList.join('\n')}`);
|
992
|
+
}
|
993
|
+
const isIgnored = (0, fileSystem_1.ignoredWatchEventFunction)(watchList);
|
994
|
+
this._libraryFileWatcher = this._fs.createFileSystemWatcher(watchList, (event, path) => {
|
995
|
+
if (!path) {
|
996
|
+
return;
|
997
|
+
}
|
998
|
+
if (this._verboseOutput) {
|
999
|
+
this._console.info(`LibraryFile: Received fs event '${event}' for path '${path}'`);
|
1000
|
+
}
|
1001
|
+
if (isIgnored(path)) {
|
1002
|
+
return;
|
1003
|
+
}
|
1004
|
+
this._scheduleLibraryAnalysis();
|
1005
|
+
});
|
1006
|
+
}
|
1007
|
+
catch {
|
1008
|
+
this._console.error(`Exception caught when installing fs watcher for:\n ${watchList.join('\n')}`);
|
1009
|
+
}
|
1010
|
+
}
|
1011
|
+
}
|
1012
|
+
_clearLibraryReanalysisTimer() {
|
1013
|
+
var _a;
|
1014
|
+
if (this._libraryReanalysisTimer) {
|
1015
|
+
clearTimeout(this._libraryReanalysisTimer);
|
1016
|
+
this._libraryReanalysisTimer = undefined;
|
1017
|
+
(_a = this._backgroundAnalysisProgram) === null || _a === void 0 ? void 0 : _a.cancelIndexing();
|
1018
|
+
}
|
1019
|
+
}
|
1020
|
+
_scheduleLibraryAnalysis() {
|
1021
|
+
if (this._disposed) {
|
1022
|
+
// Already disposed.
|
1023
|
+
return;
|
1024
|
+
}
|
1025
|
+
this._clearLibraryReanalysisTimer();
|
1026
|
+
// Wait for a little while, since library changes
|
1027
|
+
// tend to happen in big batches when packages
|
1028
|
+
// are installed or uninstalled.
|
1029
|
+
this._libraryReanalysisTimer = setTimeout(() => {
|
1030
|
+
this._clearLibraryReanalysisTimer();
|
1031
|
+
// Invalidate import resolver, mark all files dirty unconditionally,
|
1032
|
+
// and reanalyze.
|
1033
|
+
this.invalidateAndForceReanalysis(/* rebuildUserFileIndexing */ false);
|
1034
|
+
this._scheduleReanalysis(/* requireTrackedFileUpdate */ false);
|
1035
|
+
}, _libraryActivityBackoffTimeInMs);
|
1036
|
+
}
|
1037
|
+
_removeConfigFileWatcher() {
|
1038
|
+
if (this._configFileWatcher) {
|
1039
|
+
this._configFileWatcher.close();
|
1040
|
+
this._configFileWatcher = undefined;
|
1041
|
+
}
|
1042
|
+
}
|
1043
|
+
_updateConfigFileWatcher() {
|
1044
|
+
this._removeConfigFileWatcher();
|
1045
|
+
if (!this._watchForConfigChanges) {
|
1046
|
+
return;
|
1047
|
+
}
|
1048
|
+
if (this._configFilePath) {
|
1049
|
+
this._configFileWatcher = this._fs.createFileSystemWatcher([this._configFilePath], (event) => {
|
1050
|
+
if (this._verboseOutput) {
|
1051
|
+
this._console.info(`Received fs event '${event}' for config file`);
|
1052
|
+
}
|
1053
|
+
this._scheduleReloadConfigFile();
|
1054
|
+
});
|
1055
|
+
}
|
1056
|
+
else if (this._executionRootPath) {
|
1057
|
+
this._configFileWatcher = this._fs.createFileSystemWatcher([this._executionRootPath], (event, path) => {
|
1058
|
+
if (!path) {
|
1059
|
+
return;
|
1060
|
+
}
|
1061
|
+
if (event === 'add' || event === 'change') {
|
1062
|
+
const fileName = (0, pathUtils_1.getFileName)(path);
|
1063
|
+
if (fileName && exports.configFileNames.some((name) => name === fileName)) {
|
1064
|
+
if (this._verboseOutput) {
|
1065
|
+
this._console.info(`Received fs event '${event}' for config file`);
|
1066
|
+
}
|
1067
|
+
if (this._commandLineOptions) {
|
1068
|
+
this.setOptions(this._commandLineOptions);
|
1069
|
+
}
|
1070
|
+
}
|
1071
|
+
}
|
1072
|
+
});
|
1073
|
+
}
|
1074
|
+
}
|
1075
|
+
_clearReloadConfigTimer() {
|
1076
|
+
if (this._reloadConfigTimer) {
|
1077
|
+
clearTimeout(this._reloadConfigTimer);
|
1078
|
+
this._reloadConfigTimer = undefined;
|
1079
|
+
}
|
1080
|
+
}
|
1081
|
+
_scheduleReloadConfigFile() {
|
1082
|
+
this._clearReloadConfigTimer();
|
1083
|
+
// Wait for a little while after we receive the
|
1084
|
+
// change update event because it may take a while
|
1085
|
+
// for the file to be written out. Plus, there may
|
1086
|
+
// be multiple changes.
|
1087
|
+
this._reloadConfigTimer = setTimeout(() => {
|
1088
|
+
this._clearReloadConfigTimer();
|
1089
|
+
this._reloadConfigFile();
|
1090
|
+
}, 100);
|
1091
|
+
}
|
1092
|
+
_reloadConfigFile() {
|
1093
|
+
this._updateConfigFileWatcher();
|
1094
|
+
if (this._configFilePath) {
|
1095
|
+
this._console.info(`Reloading configuration file at ${this._configFilePath}`);
|
1096
|
+
const host = this._backgroundAnalysisProgram.host;
|
1097
|
+
// We can't just reload config file when it is changed; we need to consider
|
1098
|
+
// command line options as well to construct new config Options.
|
1099
|
+
const configOptions = this._getConfigOptions(host, this._commandLineOptions);
|
1100
|
+
this._backgroundAnalysisProgram.setConfigOptions(configOptions);
|
1101
|
+
this._applyConfigOptions(host);
|
1102
|
+
}
|
1103
|
+
}
|
1104
|
+
_applyConfigOptions(host) {
|
1105
|
+
var _a;
|
1106
|
+
// Allocate a new import resolver because the old one has information
|
1107
|
+
// cached based on the previous config options.
|
1108
|
+
const importResolver = this._importResolverFactory(this._fs, this._backgroundAnalysisProgram.configOptions, host);
|
1109
|
+
this._backgroundAnalysisProgram.setImportResolver(importResolver);
|
1110
|
+
if (((_a = this._commandLineOptions) === null || _a === void 0 ? void 0 : _a.fromVsCodeExtension) || this._configOptions.verboseOutput) {
|
1111
|
+
const logLevel = this._configOptions.verboseOutput ? console_1.LogLevel.Info : console_1.LogLevel.Log;
|
1112
|
+
for (const execEnv of this._configOptions.getExecutionEnvironments()) {
|
1113
|
+
(0, console_1.log)(this._console, logLevel, `Search paths for ${execEnv.root || '<default>'}`);
|
1114
|
+
const roots = importResolver.getImportRoots(execEnv, /* forLogging */ true);
|
1115
|
+
roots.forEach((path) => {
|
1116
|
+
(0, console_1.log)(this._console, logLevel, ` ${path}`);
|
1117
|
+
});
|
1118
|
+
}
|
1119
|
+
}
|
1120
|
+
this._updateLibraryFileWatcher();
|
1121
|
+
this._updateConfigFileWatcher();
|
1122
|
+
this._updateSourceFileWatchers();
|
1123
|
+
this._updateTrackedFileList(/* markFilesDirtyUnconditionally */ true);
|
1124
|
+
this._scheduleReanalysis(/* requireTrackedFileUpdate */ false);
|
1125
|
+
}
|
1126
|
+
_clearReanalysisTimer() {
|
1127
|
+
if (this._analyzeTimer) {
|
1128
|
+
clearTimeout(this._analyzeTimer);
|
1129
|
+
this._analyzeTimer = undefined;
|
1130
|
+
}
|
1131
|
+
}
|
1132
|
+
_scheduleReanalysis(requireTrackedFileUpdate) {
|
1133
|
+
var _a, _b;
|
1134
|
+
if (this._disposed || !((_a = this._commandLineOptions) === null || _a === void 0 ? void 0 : _a.enableAmbientAnalysis)) {
|
1135
|
+
// already disposed
|
1136
|
+
return;
|
1137
|
+
}
|
1138
|
+
if (requireTrackedFileUpdate) {
|
1139
|
+
this._requireTrackedFileUpdate = true;
|
1140
|
+
}
|
1141
|
+
(_b = this._backgroundAnalysisCancellationSource) === null || _b === void 0 ? void 0 : _b.cancel();
|
1142
|
+
// Remove any existing analysis timer.
|
1143
|
+
this._clearReanalysisTimer();
|
1144
|
+
// How long has it been since the user interacted with the service?
|
1145
|
+
// If the user is actively typing, back off to let him or her finish.
|
1146
|
+
const timeSinceLastUserInteractionInMs = Date.now() - this._lastUserInteractionTime;
|
1147
|
+
const minBackoffTimeInMs = _userActivityBackoffTimeInMs;
|
1148
|
+
// We choose a small non-zero value here. If this value
|
1149
|
+
// is too small (like zero), the VS Code extension becomes
|
1150
|
+
// unresponsive during heavy analysis. If this number is too
|
1151
|
+
// large, analysis takes longer.
|
1152
|
+
const minTimeBetweenAnalysisPassesInMs = 20;
|
1153
|
+
const timeUntilNextAnalysisInMs = Math.max(minBackoffTimeInMs - timeSinceLastUserInteractionInMs, minTimeBetweenAnalysisPassesInMs);
|
1154
|
+
// Schedule a new timer.
|
1155
|
+
this._analyzeTimer = setTimeout(() => {
|
1156
|
+
this._analyzeTimer = undefined;
|
1157
|
+
if (this._requireTrackedFileUpdate) {
|
1158
|
+
this._updateTrackedFileList(/* markFilesDirtyUnconditionally */ false);
|
1159
|
+
}
|
1160
|
+
// This creates a cancellation source only if it actually gets used.
|
1161
|
+
this._backgroundAnalysisCancellationSource = this._cancellationProvider.createCancellationTokenSource();
|
1162
|
+
const moreToAnalyze = this._backgroundAnalysisProgram.startAnalysis(this._backgroundAnalysisCancellationSource.token);
|
1163
|
+
if (moreToAnalyze) {
|
1164
|
+
this._scheduleReanalysis(/* requireTrackedFileUpdate */ false);
|
1165
|
+
}
|
1166
|
+
}, timeUntilNextAnalysisInMs);
|
1167
|
+
}
|
1168
|
+
_reportConfigParseError() {
|
1169
|
+
if (this._onCompletionCallback) {
|
1170
|
+
this._onCompletionCallback({
|
1171
|
+
diagnostics: [],
|
1172
|
+
filesInProgram: 0,
|
1173
|
+
filesRequiringAnalysis: 0,
|
1174
|
+
checkingOnlyOpenFiles: true,
|
1175
|
+
fatalErrorOccurred: false,
|
1176
|
+
configParseErrorOccurred: true,
|
1177
|
+
elapsedTime: 0,
|
1178
|
+
});
|
1179
|
+
}
|
1180
|
+
}
|
1181
|
+
_shouldIncludeFile(filePath) {
|
1182
|
+
return _includeFileRegex.test(filePath);
|
1183
|
+
}
|
1184
|
+
_isInExcludePath(path, excludePaths) {
|
1185
|
+
return !!excludePaths.find((excl) => excl.regExp.test(path));
|
1186
|
+
}
|
1187
|
+
_matchIncludeFileSpec(includeRegExp, exclude, filePath) {
|
1188
|
+
if (includeRegExp.test(filePath)) {
|
1189
|
+
if (!this._isInExcludePath(filePath, exclude) && this._shouldIncludeFile(filePath)) {
|
1190
|
+
return true;
|
1191
|
+
}
|
1192
|
+
}
|
1193
|
+
return false;
|
1194
|
+
}
|
1195
|
+
}
|
1196
|
+
exports.AnalyzerService = AnalyzerService;
|
1197
|
+
//# sourceMappingURL=service.js.map
|