@zzzen/pyright-internal 1.1.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer/aliasDeclarationUtils.d.ts +9 -0
- package/dist/analyzer/aliasDeclarationUtils.js +128 -0
- package/dist/analyzer/aliasDeclarationUtils.js.map +1 -0
- package/dist/analyzer/analysis.d.ts +18 -0
- package/dist/analyzer/analysis.js +81 -0
- package/dist/analyzer/analysis.js.map +1 -0
- package/dist/analyzer/analyzerFileInfo.d.ts +39 -0
- package/dist/analyzer/analyzerFileInfo.js +17 -0
- package/dist/analyzer/analyzerFileInfo.js.map +1 -0
- package/dist/analyzer/analyzerNodeInfo.d.ts +32 -0
- package/dist/analyzer/analyzerNodeInfo.js +138 -0
- package/dist/analyzer/analyzerNodeInfo.js.map +1 -0
- package/dist/analyzer/backgroundAnalysisProgram.d.ts +54 -0
- package/dist/analyzer/backgroundAnalysisProgram.js +222 -0
- package/dist/analyzer/backgroundAnalysisProgram.js.map +1 -0
- package/dist/analyzer/binder.d.ts +149 -0
- package/dist/analyzer/binder.js +3195 -0
- package/dist/analyzer/binder.js.map +1 -0
- package/dist/analyzer/checker.d.ts +116 -0
- package/dist/analyzer/checker.js +3828 -0
- package/dist/analyzer/checker.js.map +1 -0
- package/dist/analyzer/circularDependency.d.ts +7 -0
- package/dist/analyzer/circularDependency.js +51 -0
- package/dist/analyzer/circularDependency.js.map +1 -0
- package/dist/analyzer/codeFlowEngine.d.ts +21 -0
- package/dist/analyzer/codeFlowEngine.js +1132 -0
- package/dist/analyzer/codeFlowEngine.js.map +1 -0
- package/dist/analyzer/codeFlowTypes.d.ts +82 -0
- package/dist/analyzer/codeFlowTypes.js +134 -0
- package/dist/analyzer/codeFlowTypes.js.map +1 -0
- package/dist/analyzer/codeFlowUtils.d.ts +2 -0
- package/dist/analyzer/codeFlowUtils.js +348 -0
- package/dist/analyzer/codeFlowUtils.js.map +1 -0
- package/dist/analyzer/commentUtils.d.ts +4 -0
- package/dist/analyzer/commentUtils.js +131 -0
- package/dist/analyzer/commentUtils.js.map +1 -0
- package/dist/analyzer/constraintSolver.d.ts +7 -0
- package/dist/analyzer/constraintSolver.js +605 -0
- package/dist/analyzer/constraintSolver.js.map +1 -0
- package/dist/analyzer/constructorTransform.d.ts +4 -0
- package/dist/analyzer/constructorTransform.js +219 -0
- package/dist/analyzer/constructorTransform.js.map +1 -0
- package/dist/analyzer/dataClasses.d.ts +9 -0
- package/dist/analyzer/dataClasses.js +762 -0
- package/dist/analyzer/dataClasses.js.map +1 -0
- package/dist/analyzer/declaration.d.ts +90 -0
- package/dist/analyzer/declaration.js +42 -0
- package/dist/analyzer/declaration.js.map +1 -0
- package/dist/analyzer/declarationUtils.d.ts +12 -0
- package/dist/analyzer/declarationUtils.js +212 -0
- package/dist/analyzer/declarationUtils.js.map +1 -0
- package/dist/analyzer/docStringConversion.d.ts +2 -0
- package/dist/analyzer/docStringConversion.js +699 -0
- package/dist/analyzer/docStringConversion.js.map +1 -0
- package/dist/analyzer/docStringUtils.d.ts +3 -0
- package/dist/analyzer/docStringUtils.js +103 -0
- package/dist/analyzer/docStringUtils.js.map +1 -0
- package/dist/analyzer/functionTransform.d.ts +4 -0
- package/dist/analyzer/functionTransform.js +96 -0
- package/dist/analyzer/functionTransform.js.map +1 -0
- package/dist/analyzer/importResolver.d.ts +97 -0
- package/dist/analyzer/importResolver.js +1617 -0
- package/dist/analyzer/importResolver.js.map +1 -0
- package/dist/analyzer/importResult.d.ts +33 -0
- package/dist/analyzer/importResult.js +11 -0
- package/dist/analyzer/importResult.js.map +1 -0
- package/dist/analyzer/importStatementUtils.d.ts +46 -0
- package/dist/analyzer/importStatementUtils.js +618 -0
- package/dist/analyzer/importStatementUtils.js.map +1 -0
- package/dist/analyzer/namedTuples.d.ts +5 -0
- package/dist/analyzer/namedTuples.js +342 -0
- package/dist/analyzer/namedTuples.js.map +1 -0
- package/dist/analyzer/packageTypeReport.d.ts +52 -0
- package/dist/analyzer/packageTypeReport.js +45 -0
- package/dist/analyzer/packageTypeReport.js.map +1 -0
- package/dist/analyzer/packageTypeVerifier.d.ts +37 -0
- package/dist/analyzer/packageTypeVerifier.js +908 -0
- package/dist/analyzer/packageTypeVerifier.js.map +1 -0
- package/dist/analyzer/parentDirectoryCache.d.ts +23 -0
- package/dist/analyzer/parentDirectoryCache.js +71 -0
- package/dist/analyzer/parentDirectoryCache.js.map +1 -0
- package/dist/analyzer/parseTreeCleaner.d.ts +8 -0
- package/dist/analyzer/parseTreeCleaner.js +51 -0
- package/dist/analyzer/parseTreeCleaner.js.map +1 -0
- package/dist/analyzer/parseTreeUtils.d.ts +98 -0
- package/dist/analyzer/parseTreeUtils.js +1753 -0
- package/dist/analyzer/parseTreeUtils.js.map +1 -0
- package/dist/analyzer/parseTreeWalker.d.ts +81 -0
- package/dist/analyzer/parseTreeWalker.js +437 -0
- package/dist/analyzer/parseTreeWalker.js.map +1 -0
- package/dist/analyzer/patternMatching.d.ts +6 -0
- package/dist/analyzer/patternMatching.js +866 -0
- package/dist/analyzer/patternMatching.js.map +1 -0
- package/dist/analyzer/program.d.ts +158 -0
- package/dist/analyzer/program.js +1902 -0
- package/dist/analyzer/program.js.map +1 -0
- package/dist/analyzer/properties.d.ts +10 -0
- package/dist/analyzer/properties.js +368 -0
- package/dist/analyzer/properties.js.map +1 -0
- package/dist/analyzer/protocols.d.ts +8 -0
- package/dist/analyzer/protocols.js +409 -0
- package/dist/analyzer/protocols.js.map +1 -0
- package/dist/analyzer/pyTypedUtils.d.ts +6 -0
- package/dist/analyzer/pyTypedUtils.js +42 -0
- package/dist/analyzer/pyTypedUtils.js.map +1 -0
- package/dist/analyzer/pythonPathUtils.d.ts +14 -0
- package/dist/analyzer/pythonPathUtils.js +173 -0
- package/dist/analyzer/pythonPathUtils.js.map +1 -0
- package/dist/analyzer/scope.d.ts +39 -0
- package/dist/analyzer/scope.js +110 -0
- package/dist/analyzer/scope.js.map +1 -0
- package/dist/analyzer/scopeUtils.d.ts +6 -0
- package/dist/analyzer/scopeUtils.js +72 -0
- package/dist/analyzer/scopeUtils.js.map +1 -0
- package/dist/analyzer/service.d.ts +144 -0
- package/dist/analyzer/service.js +1197 -0
- package/dist/analyzer/service.js.map +1 -0
- package/dist/analyzer/sourceFile.d.ts +123 -0
- package/dist/analyzer/sourceFile.js +908 -0
- package/dist/analyzer/sourceFile.js.map +1 -0
- package/dist/analyzer/sourceMapper.d.ts +47 -0
- package/dist/analyzer/sourceMapper.js +543 -0
- package/dist/analyzer/sourceMapper.js.map +1 -0
- package/dist/analyzer/staticExpressions.d.ts +4 -0
- package/dist/analyzer/staticExpressions.js +242 -0
- package/dist/analyzer/staticExpressions.js.map +1 -0
- package/dist/analyzer/symbol.d.ts +50 -0
- package/dist/analyzer/symbol.js +160 -0
- package/dist/analyzer/symbol.js.map +1 -0
- package/dist/analyzer/symbolNameUtils.d.ts +8 -0
- package/dist/analyzer/symbolNameUtils.js +53 -0
- package/dist/analyzer/symbolNameUtils.js.map +1 -0
- package/dist/analyzer/symbolUtils.d.ts +7 -0
- package/dist/analyzer/symbolUtils.js +46 -0
- package/dist/analyzer/symbolUtils.js.map +1 -0
- package/dist/analyzer/testWalker.d.ts +14 -0
- package/dist/analyzer/testWalker.js +92 -0
- package/dist/analyzer/testWalker.js.map +1 -0
- package/dist/analyzer/tracePrinter.d.ts +11 -0
- package/dist/analyzer/tracePrinter.js +222 -0
- package/dist/analyzer/tracePrinter.js.map +1 -0
- package/dist/analyzer/typeCache.d.ts +40 -0
- package/dist/analyzer/typeCache.js +134 -0
- package/dist/analyzer/typeCache.js.map +1 -0
- package/dist/analyzer/typeDocStringUtils.d.ts +12 -0
- package/dist/analyzer/typeDocStringUtils.js +293 -0
- package/dist/analyzer/typeDocStringUtils.js.map +1 -0
- package/dist/analyzer/typeEvaluator.d.ts +18 -0
- package/dist/analyzer/typeEvaluator.js +16598 -0
- package/dist/analyzer/typeEvaluator.js.map +1 -0
- package/dist/analyzer/typeEvaluatorTypes.d.ts +220 -0
- package/dist/analyzer/typeEvaluatorTypes.js +16 -0
- package/dist/analyzer/typeEvaluatorTypes.js.map +1 -0
- package/dist/analyzer/typeEvaluatorWithTracker.d.ts +6 -0
- package/dist/analyzer/typeEvaluatorWithTracker.js +121 -0
- package/dist/analyzer/typeEvaluatorWithTracker.js.map +1 -0
- package/dist/analyzer/typeGuards.d.ts +6 -0
- package/dist/analyzer/typeGuards.js +1293 -0
- package/dist/analyzer/typeGuards.js.map +1 -0
- package/dist/analyzer/typePrinter.d.ts +17 -0
- package/dist/analyzer/typePrinter.js +603 -0
- package/dist/analyzer/typePrinter.js.map +1 -0
- package/dist/analyzer/typeStubWriter.d.ts +48 -0
- package/dist/analyzer/typeStubWriter.js +605 -0
- package/dist/analyzer/typeStubWriter.js.map +1 -0
- package/dist/analyzer/typeUtils.d.ts +134 -0
- package/dist/analyzer/typeUtils.js +2380 -0
- package/dist/analyzer/typeUtils.js.map +1 -0
- package/dist/analyzer/typeVarContext.d.ts +50 -0
- package/dist/analyzer/typeVarContext.js +250 -0
- package/dist/analyzer/typeVarContext.js.map +1 -0
- package/dist/analyzer/typedDicts.d.ts +12 -0
- package/dist/analyzer/typedDicts.js +695 -0
- package/dist/analyzer/typedDicts.js.map +1 -0
- package/dist/analyzer/types.d.ts +484 -0
- package/dist/analyzer/types.js +1844 -0
- package/dist/analyzer/types.js.map +1 -0
- package/dist/backgroundAnalysis.d.ts +14 -0
- package/dist/backgroundAnalysis.js +42 -0
- package/dist/backgroundAnalysis.js.map +1 -0
- package/dist/backgroundAnalysisBase.d.ts +83 -0
- package/dist/backgroundAnalysisBase.js +429 -0
- package/dist/backgroundAnalysisBase.js.map +1 -0
- package/dist/backgroundThreadBase.d.ts +34 -0
- package/dist/backgroundThreadBase.js +134 -0
- package/dist/backgroundThreadBase.js.map +1 -0
- package/dist/commands/commandController.d.ts +13 -0
- package/dist/commands/commandController.js +48 -0
- package/dist/commands/commandController.js.map +1 -0
- package/dist/commands/commandResult.d.ts +9 -0
- package/dist/commands/commandResult.js +19 -0
- package/dist/commands/commandResult.js.map +1 -0
- package/dist/commands/commands.d.ts +7 -0
- package/dist/commands/commands.js +11 -0
- package/dist/commands/commands.js.map +1 -0
- package/dist/commands/createTypeStub.d.ts +8 -0
- package/dist/commands/createTypeStub.js +50 -0
- package/dist/commands/createTypeStub.js.map +1 -0
- package/dist/commands/quickActionCommand.d.ts +8 -0
- package/dist/commands/quickActionCommand.js +31 -0
- package/dist/commands/quickActionCommand.js.map +1 -0
- package/dist/commands/restartServer.d.ts +8 -0
- package/dist/commands/restartServer.js +20 -0
- package/dist/commands/restartServer.js.map +1 -0
- package/dist/common/cancellationUtils.d.ts +16 -0
- package/dist/common/cancellationUtils.js +60 -0
- package/dist/common/cancellationUtils.js.map +1 -0
- package/dist/common/chokidarFileWatcherProvider.d.ts +9 -0
- package/dist/common/chokidarFileWatcherProvider.js +88 -0
- package/dist/common/chokidarFileWatcherProvider.js.map +1 -0
- package/dist/common/collectionUtils.d.ts +114 -0
- package/dist/common/collectionUtils.js +292 -0
- package/dist/common/collectionUtils.js.map +1 -0
- package/dist/common/commandLineOptions.d.ts +41 -0
- package/dist/common/commandLineOptions.js +46 -0
- package/dist/common/commandLineOptions.js.map +1 -0
- package/dist/common/configOptions.d.ts +144 -0
- package/dist/common/configOptions.js +908 -0
- package/dist/common/configOptions.js.map +1 -0
- package/dist/common/console.d.ts +61 -0
- package/dist/common/console.js +191 -0
- package/dist/common/console.js.map +1 -0
- package/dist/common/core.d.ts +67 -0
- package/dist/common/core.js +118 -0
- package/dist/common/core.js.map +1 -0
- package/dist/common/crypto.d.ts +1 -0
- package/dist/common/crypto.js +37 -0
- package/dist/common/crypto.js.map +1 -0
- package/dist/common/debug.d.ts +13 -0
- package/dist/common/debug.js +131 -0
- package/dist/common/debug.js.map +1 -0
- package/dist/common/deferred.d.ts +11 -0
- package/dist/common/deferred.js +62 -0
- package/dist/common/deferred.js.map +1 -0
- package/dist/common/diagnostic.d.ts +59 -0
- package/dist/common/diagnostic.js +134 -0
- package/dist/common/diagnostic.js.map +1 -0
- package/dist/common/diagnosticRules.d.ts +67 -0
- package/dist/common/diagnosticRules.js +83 -0
- package/dist/common/diagnosticRules.js.map +1 -0
- package/dist/common/diagnosticSink.d.ts +34 -0
- package/dist/common/diagnosticSink.js +110 -0
- package/dist/common/diagnosticSink.js.map +1 -0
- package/dist/common/editAction.d.ts +29 -0
- package/dist/common/editAction.js +11 -0
- package/dist/common/editAction.js.map +1 -0
- package/dist/common/extensibility.d.ts +11 -0
- package/dist/common/extensibility.js +10 -0
- package/dist/common/extensibility.js.map +1 -0
- package/dist/common/extensions.d.ts +3 -0
- package/dist/common/extensions.js +15 -0
- package/dist/common/extensions.js.map +1 -0
- package/dist/common/fileBasedCancellationUtils.d.ts +11 -0
- package/dist/common/fileBasedCancellationUtils.js +259 -0
- package/dist/common/fileBasedCancellationUtils.js.map +1 -0
- package/dist/common/fileSystem.d.ts +72 -0
- package/dist/common/fileSystem.js +69 -0
- package/dist/common/fileSystem.js.map +1 -0
- package/dist/common/fullAccessHost.d.ts +19 -0
- package/dist/common/fullAccessHost.js +193 -0
- package/dist/common/fullAccessHost.js.map +1 -0
- package/dist/common/host.d.ts +21 -0
- package/dist/common/host.js +30 -0
- package/dist/common/host.js.map +1 -0
- package/dist/common/logTracker.d.ts +15 -0
- package/dist/common/logTracker.js +129 -0
- package/dist/common/logTracker.js.map +1 -0
- package/dist/common/lspUtils.d.ts +3 -0
- package/dist/common/lspUtils.js +20 -0
- package/dist/common/lspUtils.js.map +1 -0
- package/dist/common/memUtils.d.ts +3 -0
- package/dist/common/memUtils.js +37 -0
- package/dist/common/memUtils.js.map +1 -0
- package/dist/common/pathConsts.d.ts +8 -0
- package/dist/common/pathConsts.js +19 -0
- package/dist/common/pathConsts.js.map +1 -0
- package/dist/common/pathUtils.d.ts +170 -0
- package/dist/common/pathUtils.js +762 -0
- package/dist/common/pathUtils.js.map +1 -0
- package/dist/common/positionUtils.d.ts +7 -0
- package/dist/common/positionUtils.js +71 -0
- package/dist/common/positionUtils.js.map +1 -0
- package/dist/common/progressReporter.d.ts +15 -0
- package/dist/common/progressReporter.js +44 -0
- package/dist/common/progressReporter.js.map +1 -0
- package/dist/common/pythonVersion.d.ts +20 -0
- package/dist/common/pythonVersion.js +71 -0
- package/dist/common/pythonVersion.js.map +1 -0
- package/dist/common/realFileSystem.d.ts +8 -0
- package/dist/common/realFileSystem.js +368 -0
- package/dist/common/realFileSystem.js.map +1 -0
- package/dist/common/stringUtils.d.ts +47 -0
- package/dist/common/stringUtils.js +160 -0
- package/dist/common/stringUtils.js.map +1 -0
- package/dist/common/textEditUtils.d.ts +3 -0
- package/dist/common/textEditUtils.js +29 -0
- package/dist/common/textEditUtils.js.map +1 -0
- package/dist/common/textRange.d.ts +47 -0
- package/dist/common/textRange.js +211 -0
- package/dist/common/textRange.js.map +1 -0
- package/dist/common/textRangeCollection.d.ts +13 -0
- package/dist/common/textRangeCollection.js +108 -0
- package/dist/common/textRangeCollection.js.map +1 -0
- package/dist/common/timing.d.ts +31 -0
- package/dist/common/timing.js +100 -0
- package/dist/common/timing.js.map +1 -0
- package/dist/common/uriParser.d.ts +12 -0
- package/dist/common/uriParser.js +25 -0
- package/dist/common/uriParser.js.map +1 -0
- package/dist/common/workspaceEditUtils.d.ts +7 -0
- package/dist/common/workspaceEditUtils.js +63 -0
- package/dist/common/workspaceEditUtils.js.map +1 -0
- package/dist/languageServerBase.d.ts +211 -0
- package/dist/languageServerBase.js +923 -0
- package/dist/languageServerBase.js.map +1 -0
- package/dist/languageService/analyzerServiceExecutor.d.ts +8 -0
- package/dist/languageService/analyzerServiceExecutor.js +97 -0
- package/dist/languageService/analyzerServiceExecutor.js.map +1 -0
- package/dist/languageService/autoImporter.d.ts +84 -0
- package/dist/languageService/autoImporter.js +635 -0
- package/dist/languageService/autoImporter.js.map +1 -0
- package/dist/languageService/callHierarchyProvider.d.ts +12 -0
- package/dist/languageService/callHierarchyProvider.js +368 -0
- package/dist/languageService/callHierarchyProvider.js.map +1 -0
- package/dist/languageService/codeActionProvider.d.ts +6 -0
- package/dist/languageService/codeActionProvider.js +53 -0
- package/dist/languageService/codeActionProvider.js.map +1 -0
- package/dist/languageService/completionProvider.d.ts +147 -0
- package/dist/languageService/completionProvider.js +2220 -0
- package/dist/languageService/completionProvider.js.map +1 -0
- package/dist/languageService/definitionProvider.d.ts +17 -0
- package/dist/languageService/definitionProvider.js +206 -0
- package/dist/languageService/definitionProvider.js.map +1 -0
- package/dist/languageService/documentHighlightProvider.d.ts +7 -0
- package/dist/languageService/documentHighlightProvider.js +63 -0
- package/dist/languageService/documentHighlightProvider.js.map +1 -0
- package/dist/languageService/documentSymbolCollector.d.ts +37 -0
- package/dist/languageService/documentSymbolCollector.js +344 -0
- package/dist/languageService/documentSymbolCollector.js.map +1 -0
- package/dist/languageService/documentSymbolProvider.d.ts +37 -0
- package/dist/languageService/documentSymbolProvider.js +308 -0
- package/dist/languageService/documentSymbolProvider.js.map +1 -0
- package/dist/languageService/hoverProvider.d.ts +25 -0
- package/dist/languageService/hoverProvider.js +366 -0
- package/dist/languageService/hoverProvider.js.map +1 -0
- package/dist/languageService/importAdder.d.ts +24 -0
- package/dist/languageService/importAdder.js +296 -0
- package/dist/languageService/importAdder.js.map +1 -0
- package/dist/languageService/importSorter.d.ts +15 -0
- package/dist/languageService/importSorter.js +152 -0
- package/dist/languageService/importSorter.js.map +1 -0
- package/dist/languageService/indentationUtils.d.ts +4 -0
- package/dist/languageService/indentationUtils.js +597 -0
- package/dist/languageService/indentationUtils.js.map +1 -0
- package/dist/languageService/quickActions.d.ts +4 -0
- package/dist/languageService/quickActions.js +97 -0
- package/dist/languageService/quickActions.js.map +1 -0
- package/dist/languageService/referencesProvider.d.ts +36 -0
- package/dist/languageService/referencesProvider.js +236 -0
- package/dist/languageService/referencesProvider.js.map +1 -0
- package/dist/languageService/renameModuleProvider.d.ts +58 -0
- package/dist/languageService/renameModuleProvider.js +884 -0
- package/dist/languageService/renameModuleProvider.js.map +1 -0
- package/dist/languageService/signatureHelpProvider.d.ts +26 -0
- package/dist/languageService/signatureHelpProvider.js +180 -0
- package/dist/languageService/signatureHelpProvider.js.map +1 -0
- package/dist/languageService/tooltipUtils.d.ts +9 -0
- package/dist/languageService/tooltipUtils.js +129 -0
- package/dist/languageService/tooltipUtils.js.map +1 -0
- package/dist/localization/localize.d.ts +1324 -0
- package/dist/localization/localize.js +788 -0
- package/dist/localization/localize.js.map +1 -0
- package/dist/localization/package.nls.de.json +1 -0
- package/dist/localization/package.nls.en-us.json +636 -0
- package/dist/localization/package.nls.es.json +1 -0
- package/dist/localization/package.nls.fr.json +1 -0
- package/dist/localization/package.nls.ja.json +1 -0
- package/dist/localization/package.nls.ru.json +1 -0
- package/dist/localization/package.nls.zh-cn.json +1 -0
- package/dist/localization/package.nls.zh-tw.json +1 -0
- package/dist/nodeMain.d.ts +1 -0
- package/dist/nodeMain.js +21 -0
- package/dist/nodeMain.js.map +1 -0
- package/dist/nodeServer.d.ts +3 -0
- package/dist/nodeServer.js +31 -0
- package/dist/nodeServer.js.map +1 -0
- package/dist/parser/characterStream.d.ts +27 -0
- package/dist/parser/characterStream.js +120 -0
- package/dist/parser/characterStream.js.map +1 -0
- package/dist/parser/characters.d.ts +17 -0
- package/dist/parser/characters.js +240 -0
- package/dist/parser/characters.js.map +1 -0
- package/dist/parser/parseNodes.d.ts +750 -0
- package/dist/parser/parseNodes.js +1406 -0
- package/dist/parser/parseNodes.js.map +1 -0
- package/dist/parser/parser.d.ts +191 -0
- package/dist/parser/parser.js +3806 -0
- package/dist/parser/parser.js.map +1 -0
- package/dist/parser/stringTokenUtils.d.ts +25 -0
- package/dist/parser/stringTokenUtils.js +455 -0
- package/dist/parser/stringTokenUtils.js.map +1 -0
- package/dist/parser/tokenizer.d.ts +71 -0
- package/dist/parser/tokenizer.js +1111 -0
- package/dist/parser/tokenizer.js.map +1 -0
- package/dist/parser/tokenizerTypes.d.ts +223 -0
- package/dist/parser/tokenizerTypes.js +164 -0
- package/dist/parser/tokenizerTypes.js.map +1 -0
- package/dist/parser/unicode.d.ts +23 -0
- package/dist/parser/unicode.js +2899 -0
- package/dist/parser/unicode.js.map +1 -0
- package/dist/pyright.d.ts +1 -0
- package/dist/pyright.js +645 -0
- package/dist/pyright.js.map +1 -0
- package/dist/pyrightFileSystem.d.ts +28 -0
- package/dist/pyrightFileSystem.js +196 -0
- package/dist/pyrightFileSystem.js.map +1 -0
- package/dist/readonlyAugmentedFileSystem.d.ts +40 -0
- package/dist/readonlyAugmentedFileSystem.js +155 -0
- package/dist/readonlyAugmentedFileSystem.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +232 -0
- package/dist/server.js.map +1 -0
- package/dist/tests/chainedSourceFiles.test.d.ts +1 -0
- package/dist/tests/chainedSourceFiles.test.js +153 -0
- package/dist/tests/chainedSourceFiles.test.js.map +1 -0
- package/dist/tests/checker.test.d.ts +1 -0
- package/dist/tests/checker.test.js +346 -0
- package/dist/tests/checker.test.js.map +1 -0
- package/dist/tests/collectionUtils.test.d.ts +1 -0
- package/dist/tests/collectionUtils.test.js +153 -0
- package/dist/tests/collectionUtils.test.js.map +1 -0
- package/dist/tests/common.test.d.ts +1 -0
- package/dist/tests/common.test.js +125 -0
- package/dist/tests/common.test.js.map +1 -0
- package/dist/tests/config.test.d.ts +1 -0
- package/dist/tests/config.test.js +230 -0
- package/dist/tests/config.test.js.map +1 -0
- package/dist/tests/debug.test.d.ts +1 -0
- package/dist/tests/debug.test.js +102 -0
- package/dist/tests/debug.test.js.map +1 -0
- package/dist/tests/deferred.test.d.ts +1 -0
- package/dist/tests/deferred.test.js +65 -0
- package/dist/tests/deferred.test.js.map +1 -0
- package/dist/tests/diagnosticOverrides.test.d.ts +1 -0
- package/dist/tests/diagnosticOverrides.test.js +108 -0
- package/dist/tests/diagnosticOverrides.test.js.map +1 -0
- package/dist/tests/docStringConversion.test.d.ts +1 -0
- package/dist/tests/docStringConversion.test.js +695 -0
- package/dist/tests/docStringConversion.test.js.map +1 -0
- package/dist/tests/docStringUtils.test.d.ts +1 -0
- package/dist/tests/docStringUtils.test.js +70 -0
- package/dist/tests/docStringUtils.test.js.map +1 -0
- package/dist/tests/documentSymbolCollector.test.d.ts +1 -0
- package/dist/tests/documentSymbolCollector.test.js +635 -0
- package/dist/tests/documentSymbolCollector.test.js.map +1 -0
- package/dist/tests/filesystem.test.d.ts +1 -0
- package/dist/tests/filesystem.test.js +194 -0
- package/dist/tests/filesystem.test.js.map +1 -0
- package/dist/tests/fourSlashParser.test.d.ts +1 -0
- package/dist/tests/fourSlashParser.test.js +281 -0
- package/dist/tests/fourSlashParser.test.js.map +1 -0
- package/dist/tests/fourSlashRunner.test.d.ts +1 -0
- package/dist/tests/fourSlashRunner.test.js +52 -0
- package/dist/tests/fourSlashRunner.test.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js +42 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js +13 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js +23 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js +35 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js +128 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js +43 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js +116 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.js +21 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js +54 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.js +245 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js +162 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js +132 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.js +37 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.comment.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.comment.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.comment.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.js +18 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.js +26 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js +15 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js +36 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.js +147 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js +131 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js +73 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js +58 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js +154 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js +143 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js +109 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.js +44 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.js +12 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fourslash.js +51 -0
- package/dist/tests/fourslash/completions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.js +32 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js +96 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.d.ts +0 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inList.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inList.fourslash.js +32 -0
- package/dist/tests/fourslash/completions.inList.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.included.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.included.fourslash.js +12 -0
- package/dist/tests/fourslash/completions.included.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js +54 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js +26 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js +49 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js +101 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js +105 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js +67 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js +75 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.literals.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.literals.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.literals.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.js +71 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js +17 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js +57 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.js +37 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.importStub.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.importStub.js +49 -0
- package/dist/tests/fourslash/completions.override.default.importStub.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.js +60 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js +63 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override2.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.override2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.params.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.params.fourslash.js +23 -0
- package/dist/tests/fourslash/completions.params.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.js +15 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.js +34 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.private.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.private.fourslash.js +61 -0
- package/dist/tests/fourslash/completions.private.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.property.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.property.fourslash.js +28 -0
- package/dist/tests/fourslash/completions.property.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js +64 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.self.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.self.fourslash.js +43 -0
- package/dist/tests/fourslash/completions.self.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js +71 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.js +78 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.js +9 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.js +33 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.js +109 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.with.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.with.fourslash.js +25 -0
- package/dist/tests/fourslash/completions.with.fourslash.js.map +1 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js +64 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js +24 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.js +93 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js +19 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.js +123 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.js +79 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.js +154 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.js +42 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js +34 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js +213 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js +154 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js +29 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js +30 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js +26 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js +28 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js +33 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js +26 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js +59 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js +59 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js +94 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.js +79 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js +106 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js +24 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js +66 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js +26 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js +36 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.fourslash.js +30 -0
- package/dist/tests/fourslash/findallreferences.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.js +30 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js +46 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js +60 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js +54 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.js +41 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js +83 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js +32 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.js +22 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js +29 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js +33 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js +36 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js +44 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js +31 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.js +22 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.js.map +1 -0
- package/dist/tests/fourslash/fourslash.d.ts +301 -0
- package/dist/tests/fourslash/fourslash.js +25 -0
- package/dist/tests/fourslash/fourslash.js.map +1 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js +30 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js +63 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.js +14 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.js +47 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.js +77 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js +22 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js +22 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js +21 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js +25 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js +18 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.js +12 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.js +24 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.js +23 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.import.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.import.fourslash.js +10 -0
- package/dist/tests/fourslash/hover.import.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js +61 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js +51 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js +40 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js +43 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js +44 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js +84 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js +88 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.init.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.init.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.init.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js +49 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js +39 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.js +39 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js +14 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.js +50 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.js +35 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.js +73 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.js +63 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js +72 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js +61 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js +35 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js +35 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.js +24 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.js.map +1 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.js +13 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js +18 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.js +13 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js +31 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js +44 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js +35 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js +35 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.js +18 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js +34 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js.map +1 -0
- package/dist/tests/fourslash/noerrors.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/noerrors.fourslash.js +9 -0
- package/dist/tests/fourslash/noerrors.fourslash.js.map +1 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.js +17 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.js.map +1 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.js +21 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.js +23 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js +23 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.fourslash.js +26 -0
- package/dist/tests/fourslash/rename.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.library.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.library.fourslash.js +26 -0
- package/dist/tests/fourslash/rename.library.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js +29 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.d.ts +2 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.js +19 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js +33 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.js +39 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.string.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.string.fourslash.js +25 -0
- package/dist/tests/fourslash/rename.string.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js +62 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.js +97 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.js +22 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.js +42 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js +49 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js +115 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.overload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.overload.fourslash.js +63 -0
- package/dist/tests/fourslash/signature.overload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.simple.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.simple.fourslash.js +104 -0
- package/dist/tests/fourslash/signature.simple.fourslash.js.map +1 -0
- package/dist/tests/harness/fourslash/fourSlashParser.d.ts +10 -0
- package/dist/tests/harness/fourslash/fourSlashParser.js +347 -0
- package/dist/tests/harness/fourslash/fourSlashParser.js.map +1 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.d.ts +81 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.js +65 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.js.map +1 -0
- package/dist/tests/harness/fourslash/runner.d.ts +20 -0
- package/dist/tests/harness/fourslash/runner.js +93 -0
- package/dist/tests/harness/fourslash/runner.js.map +1 -0
- package/dist/tests/harness/fourslash/testLanguageService.d.ts +40 -0
- package/dist/tests/harness/fourslash/testLanguageService.js +120 -0
- package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -0
- package/dist/tests/harness/fourslash/testState.Consts.d.ts +11 -0
- package/dist/tests/harness/fourslash/testState.Consts.js +50 -0
- package/dist/tests/harness/fourslash/testState.Consts.js.map +1 -0
- package/dist/tests/harness/fourslash/testState.d.ts +232 -0
- package/dist/tests/harness/fourslash/testState.js +1381 -0
- package/dist/tests/harness/fourslash/testState.js.map +1 -0
- package/dist/tests/harness/testAccessHost.d.ts +8 -0
- package/dist/tests/harness/testAccessHost.js +26 -0
- package/dist/tests/harness/testAccessHost.js.map +1 -0
- package/dist/tests/harness/testHost.d.ts +16 -0
- package/dist/tests/harness/testHost.js +161 -0
- package/dist/tests/harness/testHost.js.map +1 -0
- package/dist/tests/harness/utils.d.ts +74 -0
- package/dist/tests/harness/utils.js +328 -0
- package/dist/tests/harness/utils.js.map +1 -0
- package/dist/tests/harness/vfs/factory.d.ts +32 -0
- package/dist/tests/harness/vfs/factory.js +173 -0
- package/dist/tests/harness/vfs/factory.js.map +1 -0
- package/dist/tests/harness/vfs/filesystem.d.ts +430 -0
- package/dist/tests/harness/vfs/filesystem.js +1455 -0
- package/dist/tests/harness/vfs/filesystem.js.map +1 -0
- package/dist/tests/harness/vfs/pathValidation.d.ts +24 -0
- package/dist/tests/harness/vfs/pathValidation.js +123 -0
- package/dist/tests/harness/vfs/pathValidation.js.map +1 -0
- package/dist/tests/importAdder.test.d.ts +1 -0
- package/dist/tests/importAdder.test.js +1192 -0
- package/dist/tests/importAdder.test.js.map +1 -0
- package/dist/tests/importResolver.test.d.ts +1 -0
- package/dist/tests/importResolver.test.js +450 -0
- package/dist/tests/importResolver.test.js.map +1 -0
- package/dist/tests/importStatementUtils.test.d.ts +1 -0
- package/dist/tests/importStatementUtils.test.js +371 -0
- package/dist/tests/importStatementUtils.test.js.map +1 -0
- package/dist/tests/indentationUtils.ptvs.test.d.ts +1 -0
- package/dist/tests/indentationUtils.ptvs.test.js +324 -0
- package/dist/tests/indentationUtils.ptvs.test.js.map +1 -0
- package/dist/tests/indentationUtils.reindent.test.d.ts +1 -0
- package/dist/tests/indentationUtils.reindent.test.js +332 -0
- package/dist/tests/indentationUtils.reindent.test.js.map +1 -0
- package/dist/tests/indentationUtils.test.d.ts +1 -0
- package/dist/tests/indentationUtils.test.js +375 -0
- package/dist/tests/indentationUtils.test.js.map +1 -0
- package/dist/tests/ipythonMode.test.d.ts +1 -0
- package/dist/tests/ipythonMode.test.js +303 -0
- package/dist/tests/ipythonMode.test.js.map +1 -0
- package/dist/tests/localizer.test.d.ts +1 -0
- package/dist/tests/localizer.test.js +64 -0
- package/dist/tests/localizer.test.js.map +1 -0
- package/dist/tests/parseTreeUtils.test.d.ts +1 -0
- package/dist/tests/parseTreeUtils.test.js +228 -0
- package/dist/tests/parseTreeUtils.test.js.map +1 -0
- package/dist/tests/parser.test.d.ts +1 -0
- package/dist/tests/parser.test.js +101 -0
- package/dist/tests/parser.test.js.map +1 -0
- package/dist/tests/pathUtils.test.d.ts +1 -0
- package/dist/tests/pathUtils.test.js +253 -0
- package/dist/tests/pathUtils.test.js.map +1 -0
- package/dist/tests/pyrightFileSystem.test.d.ts +1 -0
- package/dist/tests/pyrightFileSystem.test.js +152 -0
- package/dist/tests/pyrightFileSystem.test.js.map +1 -0
- package/dist/tests/renameModule.folder.test.d.ts +1 -0
- package/dist/tests/renameModule.folder.test.js +229 -0
- package/dist/tests/renameModule.folder.test.js.map +1 -0
- package/dist/tests/renameModule.fromImports.test.d.ts +1 -0
- package/dist/tests/renameModule.fromImports.test.js +790 -0
- package/dist/tests/renameModule.fromImports.test.js.map +1 -0
- package/dist/tests/renameModule.imports.test.d.ts +1 -0
- package/dist/tests/renameModule.imports.test.js +380 -0
- package/dist/tests/renameModule.imports.test.js.map +1 -0
- package/dist/tests/renameModule.misc.test.d.ts +1 -0
- package/dist/tests/renameModule.misc.test.js +615 -0
- package/dist/tests/renameModule.misc.test.js.map +1 -0
- package/dist/tests/renameModule.relativePath.test.d.ts +1 -0
- package/dist/tests/renameModule.relativePath.test.js +231 -0
- package/dist/tests/renameModule.relativePath.test.js.map +1 -0
- package/dist/tests/renameModuleTestUtils.d.ts +4 -0
- package/dist/tests/renameModuleTestUtils.js +148 -0
- package/dist/tests/renameModuleTestUtils.js.map +1 -0
- package/dist/tests/sourceFile.test.d.ts +1 -0
- package/dist/tests/sourceFile.test.js +25 -0
- package/dist/tests/sourceFile.test.js.map +1 -0
- package/dist/tests/stringUtils.test.d.ts +1 -0
- package/dist/tests/stringUtils.test.js +69 -0
- package/dist/tests/stringUtils.test.js.map +1 -0
- package/dist/tests/symbolNameUtils.test.d.ts +1 -0
- package/dist/tests/symbolNameUtils.test.js +83 -0
- package/dist/tests/symbolNameUtils.test.js.map +1 -0
- package/dist/tests/testState.test.d.ts +1 -0
- package/dist/tests/testState.test.js +521 -0
- package/dist/tests/testState.test.js.map +1 -0
- package/dist/tests/testUtils.d.ts +27 -0
- package/dist/tests/testUtils.js +213 -0
- package/dist/tests/testUtils.js.map +1 -0
- package/dist/tests/tokenizer.test.d.ts +1 -0
- package/dist/tests/tokenizer.test.js +1277 -0
- package/dist/tests/tokenizer.test.js.map +1 -0
- package/dist/tests/typeEvaluator1.test.d.ts +1 -0
- package/dist/tests/typeEvaluator1.test.js +1023 -0
- package/dist/tests/typeEvaluator1.test.js.map +1 -0
- package/dist/tests/typeEvaluator2.test.d.ts +1 -0
- package/dist/tests/typeEvaluator2.test.js +869 -0
- package/dist/tests/typeEvaluator2.test.js.map +1 -0
- package/dist/tests/typeEvaluator3.test.d.ts +1 -0
- package/dist/tests/typeEvaluator3.test.js +915 -0
- package/dist/tests/typeEvaluator3.test.js.map +1 -0
- package/dist/tests/typeEvaluator4.test.d.ts +1 -0
- package/dist/tests/typeEvaluator4.test.js +901 -0
- package/dist/tests/typeEvaluator4.test.js.map +1 -0
- package/dist/tests/updateSymbolReference.test.d.ts +1 -0
- package/dist/tests/updateSymbolReference.test.js +980 -0
- package/dist/tests/updateSymbolReference.test.js.map +1 -0
- package/dist/tests/zipfs.test.d.ts +1 -0
- package/dist/tests/zipfs.test.js +112 -0
- package/dist/tests/zipfs.test.js.map +1 -0
- package/dist/workspaceMap.d.ts +6 -0
- package/dist/workspaceMap.js +73 -0
- package/dist/workspaceMap.js.map +1 -0
- package/package.json +45 -0
@@ -0,0 +1,908 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* sourceFile.ts
|
4
|
+
* Copyright (c) Microsoft Corporation.
|
5
|
+
* Licensed under the MIT license.
|
6
|
+
* Author: Eric Traut
|
7
|
+
*
|
8
|
+
* Class that represents a single python source file.
|
9
|
+
*/
|
10
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
11
|
+
if (k2 === undefined) k2 = k;
|
12
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
13
|
+
}) : (function(o, m, k, k2) {
|
14
|
+
if (k2 === undefined) k2 = k;
|
15
|
+
o[k2] = m[k];
|
16
|
+
}));
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
19
|
+
}) : function(o, v) {
|
20
|
+
o["default"] = v;
|
21
|
+
});
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
23
|
+
if (mod && mod.__esModule) return mod;
|
24
|
+
var result = {};
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
26
|
+
__setModuleDefault(result, mod);
|
27
|
+
return result;
|
28
|
+
};
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
30
|
+
exports.SourceFile = void 0;
|
31
|
+
const vscode_languageserver_textdocument_1 = require("vscode-languageserver-textdocument");
|
32
|
+
const worker_threads_1 = require("worker_threads");
|
33
|
+
const SymbolNameUtils = __importStar(require("../analyzer/symbolNameUtils"));
|
34
|
+
const cancellationUtils_1 = require("../common/cancellationUtils");
|
35
|
+
const configOptions_1 = require("../common/configOptions");
|
36
|
+
const console_1 = require("../common/console");
|
37
|
+
const debug_1 = require("../common/debug");
|
38
|
+
const diagnostic_1 = require("../common/diagnostic");
|
39
|
+
const diagnosticSink_1 = require("../common/diagnosticSink");
|
40
|
+
const logTracker_1 = require("../common/logTracker");
|
41
|
+
const lspUtils_1 = require("../common/lspUtils");
|
42
|
+
const pathUtils_1 = require("../common/pathUtils");
|
43
|
+
const positionUtils_1 = require("../common/positionUtils");
|
44
|
+
const StringUtils = __importStar(require("../common/stringUtils"));
|
45
|
+
const textRange_1 = require("../common/textRange");
|
46
|
+
const textRangeCollection_1 = require("../common/textRangeCollection");
|
47
|
+
const timing_1 = require("../common/timing");
|
48
|
+
const completionProvider_1 = require("../languageService/completionProvider");
|
49
|
+
const definitionProvider_1 = require("../languageService/definitionProvider");
|
50
|
+
const documentHighlightProvider_1 = require("../languageService/documentHighlightProvider");
|
51
|
+
const documentSymbolProvider_1 = require("../languageService/documentSymbolProvider");
|
52
|
+
const hoverProvider_1 = require("../languageService/hoverProvider");
|
53
|
+
const quickActions_1 = require("../languageService/quickActions");
|
54
|
+
const referencesProvider_1 = require("../languageService/referencesProvider");
|
55
|
+
const signatureHelpProvider_1 = require("../languageService/signatureHelpProvider");
|
56
|
+
const localize_1 = require("../localization/localize");
|
57
|
+
const parseNodes_1 = require("../parser/parseNodes");
|
58
|
+
const parser_1 = require("../parser/parser");
|
59
|
+
const AnalyzerNodeInfo = __importStar(require("./analyzerNodeInfo"));
|
60
|
+
const binder_1 = require("./binder");
|
61
|
+
const checker_1 = require("./checker");
|
62
|
+
const CommentUtils = __importStar(require("./commentUtils"));
|
63
|
+
const parseTreeCleaner_1 = require("./parseTreeCleaner");
|
64
|
+
const testWalker_1 = require("./testWalker");
|
65
|
+
// Limit the number of import cycles tracked per source file.
|
66
|
+
const _maxImportCyclesPerFile = 4;
|
67
|
+
// Allow files up to 50MB in length, same as VS Code.
|
68
|
+
// https://github.com/microsoft/vscode/blob/1e750a7514f365585d8dab1a7a82e0938481ea2f/src/vs/editor/common/model/textModel.ts#L194
|
69
|
+
const _maxSourceFileSize = 50 * 1024 * 1024;
|
70
|
+
class SourceFile {
|
71
|
+
constructor(fs, filePath, moduleName, isThirdPartyImport, isThirdPartyPyTypedPresent, console, logTracker, ipythonMode = false) {
|
72
|
+
// True if the file appears to have been deleted.
|
73
|
+
this._isFileDeleted = false;
|
74
|
+
// Number that is incremented every time the diagnostics
|
75
|
+
// are updated.
|
76
|
+
this._diagnosticVersion = 0;
|
77
|
+
// Generation count of the file contents. When the contents
|
78
|
+
// change, this is incremented.
|
79
|
+
this._fileContentsVersion = 0;
|
80
|
+
// Length and hash of the file the last time it was read from disk.
|
81
|
+
this._lastFileContentLength = undefined;
|
82
|
+
this._lastFileContentHash = undefined;
|
83
|
+
// Version of file contents that have been analyzed.
|
84
|
+
this._analyzedFileContentsVersion = -1;
|
85
|
+
// Do we need to walk the parse tree and clean
|
86
|
+
// the binder information hanging from it?
|
87
|
+
this._parseTreeNeedsCleaning = false;
|
88
|
+
// Reentrancy check for binding.
|
89
|
+
this._isBindingInProgress = false;
|
90
|
+
// Diagnostics generated during different phases of analysis.
|
91
|
+
this._parseDiagnostics = [];
|
92
|
+
this._bindDiagnostics = [];
|
93
|
+
this._checkerDiagnostics = [];
|
94
|
+
this._typeIgnoreLines = new Map();
|
95
|
+
this._pyrightIgnoreLines = new Map();
|
96
|
+
// Settings that control which diagnostics should be output.
|
97
|
+
this._diagnosticRuleSet = (0, configOptions_1.getBasicDiagnosticRuleSet)();
|
98
|
+
// Circular dependencies that have been reported in this file.
|
99
|
+
this._circularDependencies = [];
|
100
|
+
this._noCircularDependencyConfirmed = false;
|
101
|
+
// Do we need to perform a binding step?
|
102
|
+
this._isBindingNeeded = true;
|
103
|
+
// Do we have valid diagnostic results from a checking pass?
|
104
|
+
this._isCheckingNeeded = true;
|
105
|
+
// Do we need to perform an indexing step?
|
106
|
+
this._indexingNeeded = true;
|
107
|
+
// Indicate whether this file is for ipython or not.
|
108
|
+
this._ipythonMode = false;
|
109
|
+
this.fileSystem = fs;
|
110
|
+
this._console = console || new console_1.StandardConsole();
|
111
|
+
this._filePath = filePath;
|
112
|
+
this._moduleName = moduleName;
|
113
|
+
this._isStubFile = filePath.endsWith('.pyi');
|
114
|
+
this._isThirdPartyImport = isThirdPartyImport;
|
115
|
+
this._isThirdPartyPyTypedPresent = isThirdPartyPyTypedPresent;
|
116
|
+
const fileName = (0, pathUtils_1.getFileName)(filePath);
|
117
|
+
this._isTypingStubFile =
|
118
|
+
this._isStubFile &&
|
119
|
+
(this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/typing.pyi')) || fileName === 'typing_extensions.pyi');
|
120
|
+
this._isTypingExtensionsStubFile = this._isStubFile && fileName === 'typing_extensions.pyi';
|
121
|
+
this._isBuiltInStubFile = false;
|
122
|
+
if (this._isStubFile) {
|
123
|
+
if (this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/collections/__init__.pyi')) ||
|
124
|
+
this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/asyncio/futures.pyi')) ||
|
125
|
+
this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/asyncio/tasks.pyi')) ||
|
126
|
+
this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/builtins.pyi')) ||
|
127
|
+
this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/_importlib_modulespec.pyi')) ||
|
128
|
+
this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/dataclasses.pyi')) ||
|
129
|
+
this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/abc.pyi')) ||
|
130
|
+
this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/enum.pyi')) ||
|
131
|
+
this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/queue.pyi')) ||
|
132
|
+
this._filePath.endsWith((0, pathUtils_1.normalizeSlashes)('stdlib/types.pyi'))) {
|
133
|
+
this._isBuiltInStubFile = true;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
// 'FG' or 'BG' based on current thread.
|
137
|
+
this._logTracker = logTracker !== null && logTracker !== void 0 ? logTracker : new logTracker_1.LogTracker(console, worker_threads_1.isMainThread ? 'FG' : 'BG');
|
138
|
+
this._ipythonMode = ipythonMode;
|
139
|
+
}
|
140
|
+
getFilePath() {
|
141
|
+
return this._filePath;
|
142
|
+
}
|
143
|
+
getDiagnosticVersion() {
|
144
|
+
return this._diagnosticVersion;
|
145
|
+
}
|
146
|
+
isStubFile() {
|
147
|
+
return this._isStubFile;
|
148
|
+
}
|
149
|
+
isThirdPartyPyTypedPresent() {
|
150
|
+
return this._isThirdPartyPyTypedPresent;
|
151
|
+
}
|
152
|
+
// Returns a list of cached diagnostics from the latest analysis job.
|
153
|
+
// If the prevVersion is specified, the method returns undefined if
|
154
|
+
// the diagnostics haven't changed.
|
155
|
+
getDiagnostics(options, prevDiagnosticVersion) {
|
156
|
+
if (this._diagnosticVersion === prevDiagnosticVersion) {
|
157
|
+
return undefined;
|
158
|
+
}
|
159
|
+
let includeWarningsAndErrors = true;
|
160
|
+
// If a file was imported as a third-party file, don't report
|
161
|
+
// any errors for it. The user can't fix them anyway.
|
162
|
+
if (this._isThirdPartyImport) {
|
163
|
+
includeWarningsAndErrors = false;
|
164
|
+
}
|
165
|
+
let diagList = [...this._parseDiagnostics, ...this._bindDiagnostics, ...this._checkerDiagnostics];
|
166
|
+
const prefilteredDiagList = diagList;
|
167
|
+
const typeIgnoreLinesClone = new Map(this._typeIgnoreLines);
|
168
|
+
const pyrightIgnoreLinesClone = new Map(this._pyrightIgnoreLines);
|
169
|
+
// Filter the diagnostics based on "type: ignore" lines.
|
170
|
+
if (this._diagnosticRuleSet.enableTypeIgnoreComments) {
|
171
|
+
if (this._typeIgnoreLines.size > 0) {
|
172
|
+
diagList = diagList.filter((d) => {
|
173
|
+
if (d.category !== 3 /* UnusedCode */ && d.category !== 4 /* Deprecated */) {
|
174
|
+
for (let line = d.range.start.line; line <= d.range.end.line; line++) {
|
175
|
+
if (this._typeIgnoreLines.has(line)) {
|
176
|
+
typeIgnoreLinesClone.delete(line);
|
177
|
+
return false;
|
178
|
+
}
|
179
|
+
}
|
180
|
+
}
|
181
|
+
return true;
|
182
|
+
});
|
183
|
+
}
|
184
|
+
}
|
185
|
+
// Filter the diagnostics based on "pyright: ignore" lines.
|
186
|
+
if (this._pyrightIgnoreLines.size > 0) {
|
187
|
+
diagList = diagList.filter((d) => {
|
188
|
+
if (d.category !== 3 /* UnusedCode */ && d.category !== 4 /* Deprecated */) {
|
189
|
+
for (let line = d.range.start.line; line <= d.range.end.line; line++) {
|
190
|
+
const pyrightIgnoreComment = this._pyrightIgnoreLines.get(line);
|
191
|
+
if (pyrightIgnoreComment) {
|
192
|
+
if (!pyrightIgnoreComment.rulesList) {
|
193
|
+
pyrightIgnoreLinesClone.delete(line);
|
194
|
+
return false;
|
195
|
+
}
|
196
|
+
const diagRule = d.getRule();
|
197
|
+
if (!diagRule) {
|
198
|
+
// If there's no diagnostic rule, it won't match
|
199
|
+
// against a rules list.
|
200
|
+
return true;
|
201
|
+
}
|
202
|
+
// Did we find this rule in the list?
|
203
|
+
if (pyrightIgnoreComment.rulesList.find((rule) => rule.text === diagRule)) {
|
204
|
+
// Update the pyrightIgnoreLinesClone to remove this rule.
|
205
|
+
const oldClone = pyrightIgnoreLinesClone.get(line);
|
206
|
+
if (oldClone === null || oldClone === void 0 ? void 0 : oldClone.rulesList) {
|
207
|
+
const filteredRulesList = oldClone.rulesList.filter((rule) => rule.text !== diagRule);
|
208
|
+
if (filteredRulesList.length === 0) {
|
209
|
+
pyrightIgnoreLinesClone.delete(line);
|
210
|
+
}
|
211
|
+
else {
|
212
|
+
pyrightIgnoreLinesClone.set(line, {
|
213
|
+
range: oldClone.range,
|
214
|
+
rulesList: filteredRulesList,
|
215
|
+
});
|
216
|
+
}
|
217
|
+
}
|
218
|
+
return false;
|
219
|
+
}
|
220
|
+
return true;
|
221
|
+
}
|
222
|
+
}
|
223
|
+
}
|
224
|
+
return true;
|
225
|
+
});
|
226
|
+
}
|
227
|
+
const unnecessaryTypeIgnoreDiags = [];
|
228
|
+
if (this._diagnosticRuleSet.reportUnnecessaryTypeIgnoreComment !== 'none') {
|
229
|
+
const diagCategory = (0, diagnostic_1.convertLevelToCategory)(this._diagnosticRuleSet.reportUnnecessaryTypeIgnoreComment);
|
230
|
+
const prefilteredErrorList = prefilteredDiagList.filter((diag) => diag.category === 0 /* Error */ ||
|
231
|
+
diag.category === 1 /* Warning */ ||
|
232
|
+
diag.category === 2 /* Information */);
|
233
|
+
if (prefilteredErrorList.length === 0 && this._typeIgnoreAll !== undefined) {
|
234
|
+
unnecessaryTypeIgnoreDiags.push(new diagnostic_1.Diagnostic(diagCategory, localize_1.Localizer.Diagnostic.unnecessaryTypeIgnore(), (0, positionUtils_1.convertOffsetsToRange)(this._typeIgnoreAll.range.start, this._typeIgnoreAll.range.start + this._typeIgnoreAll.range.length, this._parseResults.tokenizerOutput.lines)));
|
235
|
+
}
|
236
|
+
typeIgnoreLinesClone.forEach((ignoreComment) => {
|
237
|
+
var _a;
|
238
|
+
if ((_a = this._parseResults) === null || _a === void 0 ? void 0 : _a.tokenizerOutput.lines) {
|
239
|
+
unnecessaryTypeIgnoreDiags.push(new diagnostic_1.Diagnostic(diagCategory, localize_1.Localizer.Diagnostic.unnecessaryTypeIgnore(), (0, positionUtils_1.convertOffsetsToRange)(ignoreComment.range.start, ignoreComment.range.start + ignoreComment.range.length, this._parseResults.tokenizerOutput.lines)));
|
240
|
+
}
|
241
|
+
});
|
242
|
+
pyrightIgnoreLinesClone.forEach((ignoreComment) => {
|
243
|
+
var _a;
|
244
|
+
if ((_a = this._parseResults) === null || _a === void 0 ? void 0 : _a.tokenizerOutput.lines) {
|
245
|
+
if (!ignoreComment.rulesList) {
|
246
|
+
unnecessaryTypeIgnoreDiags.push(new diagnostic_1.Diagnostic(diagCategory, localize_1.Localizer.Diagnostic.unnecessaryPyrightIgnore(), (0, positionUtils_1.convertOffsetsToRange)(ignoreComment.range.start, ignoreComment.range.start + ignoreComment.range.length, this._parseResults.tokenizerOutput.lines)));
|
247
|
+
}
|
248
|
+
else {
|
249
|
+
ignoreComment.rulesList.forEach((unusedRule) => {
|
250
|
+
unnecessaryTypeIgnoreDiags.push(new diagnostic_1.Diagnostic(diagCategory, localize_1.Localizer.Diagnostic.unnecessaryPyrightIgnoreRule().format({
|
251
|
+
name: unusedRule.text,
|
252
|
+
}), (0, positionUtils_1.convertOffsetsToRange)(unusedRule.range.start, unusedRule.range.start + unusedRule.range.length, this._parseResults.tokenizerOutput.lines)));
|
253
|
+
});
|
254
|
+
}
|
255
|
+
}
|
256
|
+
});
|
257
|
+
}
|
258
|
+
if (this._diagnosticRuleSet.reportImportCycles !== 'none' && this._circularDependencies.length > 0) {
|
259
|
+
const category = (0, diagnostic_1.convertLevelToCategory)(this._diagnosticRuleSet.reportImportCycles);
|
260
|
+
this._circularDependencies.forEach((cirDep) => {
|
261
|
+
diagList.push(new diagnostic_1.Diagnostic(category, localize_1.Localizer.Diagnostic.importCycleDetected() +
|
262
|
+
'\n' +
|
263
|
+
cirDep
|
264
|
+
.getPaths()
|
265
|
+
.map((path) => ' ' + path)
|
266
|
+
.join('\n'), (0, textRange_1.getEmptyRange)()));
|
267
|
+
});
|
268
|
+
}
|
269
|
+
if (this._hitMaxImportDepth !== undefined) {
|
270
|
+
diagList.push(new diagnostic_1.Diagnostic(0 /* Error */, localize_1.Localizer.Diagnostic.importDepthExceeded().format({ depth: this._hitMaxImportDepth }), (0, textRange_1.getEmptyRange)()));
|
271
|
+
}
|
272
|
+
// If the file is in the ignore list, clear the diagnostic list.
|
273
|
+
if (options.ignore.find((ignoreFileSpec) => ignoreFileSpec.regExp.test(this._filePath))) {
|
274
|
+
diagList = [];
|
275
|
+
}
|
276
|
+
// If there is a "type: ignore" comment at the top of the file, clear
|
277
|
+
// the diagnostic list of all error, warning, and information diagnostics.
|
278
|
+
if (this._diagnosticRuleSet.enableTypeIgnoreComments) {
|
279
|
+
if (this._typeIgnoreAll !== undefined) {
|
280
|
+
diagList = diagList.filter((diag) => diag.category !== 0 /* Error */ &&
|
281
|
+
diag.category !== 1 /* Warning */ &&
|
282
|
+
diag.category !== 2 /* Information */);
|
283
|
+
}
|
284
|
+
}
|
285
|
+
// Now add in the "unnecessary type ignore" diagnostics.
|
286
|
+
diagList = diagList.concat(unnecessaryTypeIgnoreDiags);
|
287
|
+
// If we're not returning any diagnostics, filter out all of
|
288
|
+
// the errors and warnings, leaving only the unreachable code
|
289
|
+
// and deprecated diagnostics.
|
290
|
+
if (!includeWarningsAndErrors) {
|
291
|
+
diagList = diagList.filter((diag) => diag.category === 3 /* UnusedCode */ || diag.category === 4 /* Deprecated */);
|
292
|
+
}
|
293
|
+
return diagList;
|
294
|
+
}
|
295
|
+
getImports() {
|
296
|
+
return this._imports || [];
|
297
|
+
}
|
298
|
+
getBuiltinsImport() {
|
299
|
+
return this._builtinsImport;
|
300
|
+
}
|
301
|
+
getIPythonDisplayImport() {
|
302
|
+
return this._ipythonDisplayImport;
|
303
|
+
}
|
304
|
+
getModuleSymbolTable() {
|
305
|
+
return this._moduleSymbolTable;
|
306
|
+
}
|
307
|
+
getCheckTime() {
|
308
|
+
return this._checkTime;
|
309
|
+
}
|
310
|
+
// Indicates whether the contents of the file have changed since
|
311
|
+
// the last analysis was performed.
|
312
|
+
didContentsChangeOnDisk() {
|
313
|
+
// If this is an open file any content changes will be
|
314
|
+
// provided through the editor. We can assume contents
|
315
|
+
// didn't change without us knowing about them.
|
316
|
+
if (this._clientDocument) {
|
317
|
+
return false;
|
318
|
+
}
|
319
|
+
// If the file was never read previously, no need to check for a change.
|
320
|
+
if (this._lastFileContentLength === undefined) {
|
321
|
+
return false;
|
322
|
+
}
|
323
|
+
// Read in the latest file contents and see if the hash matches
|
324
|
+
// that of the previous contents.
|
325
|
+
try {
|
326
|
+
// Read the file's contents.
|
327
|
+
const fileContents = this.fileSystem.readFileSync(this._filePath, 'utf8');
|
328
|
+
if (fileContents.length !== this._lastFileContentLength) {
|
329
|
+
return true;
|
330
|
+
}
|
331
|
+
if (StringUtils.hashString(fileContents) !== this._lastFileContentHash) {
|
332
|
+
return true;
|
333
|
+
}
|
334
|
+
}
|
335
|
+
catch (error) {
|
336
|
+
return true;
|
337
|
+
}
|
338
|
+
return false;
|
339
|
+
}
|
340
|
+
// Drop parse and binding info to save memory. It is used
|
341
|
+
// in cases where memory is low. When info is needed, the file
|
342
|
+
// will be re-parsed and rebound.
|
343
|
+
dropParseAndBindInfo() {
|
344
|
+
this._parseResults = undefined;
|
345
|
+
this._moduleSymbolTable = undefined;
|
346
|
+
this._isBindingNeeded = true;
|
347
|
+
}
|
348
|
+
markDirty(indexingNeeded = true) {
|
349
|
+
this._fileContentsVersion++;
|
350
|
+
this._noCircularDependencyConfirmed = false;
|
351
|
+
this._isCheckingNeeded = true;
|
352
|
+
this._isBindingNeeded = true;
|
353
|
+
this._indexingNeeded = indexingNeeded;
|
354
|
+
this._moduleSymbolTable = undefined;
|
355
|
+
this._cachedIndexResults = undefined;
|
356
|
+
}
|
357
|
+
markReanalysisRequired(forceRebinding) {
|
358
|
+
// Keep the parse info, but reset the analysis to the beginning.
|
359
|
+
this._isCheckingNeeded = true;
|
360
|
+
// If the file contains a wildcard import or __all__ symbols,
|
361
|
+
// we need to rebind because a dependent import may have changed.
|
362
|
+
if (this._parseResults) {
|
363
|
+
if (this._parseResults.containsWildcardImport ||
|
364
|
+
AnalyzerNodeInfo.getDunderAllInfo(this._parseResults.parseTree) !== undefined ||
|
365
|
+
forceRebinding) {
|
366
|
+
// We don't need to rebuild index data since wildcard
|
367
|
+
// won't affect user file indices. User file indices
|
368
|
+
// don't contain import alias info.
|
369
|
+
this._parseTreeNeedsCleaning = true;
|
370
|
+
this._isBindingNeeded = true;
|
371
|
+
this._moduleSymbolTable = undefined;
|
372
|
+
}
|
373
|
+
}
|
374
|
+
}
|
375
|
+
getClientVersion() {
|
376
|
+
var _a;
|
377
|
+
return (_a = this._clientDocument) === null || _a === void 0 ? void 0 : _a.version;
|
378
|
+
}
|
379
|
+
getOpenFileContents() {
|
380
|
+
var _a;
|
381
|
+
return (_a = this._clientDocument) === null || _a === void 0 ? void 0 : _a.getText();
|
382
|
+
}
|
383
|
+
getFileContent() {
|
384
|
+
// Get current buffer content if the file is opened.
|
385
|
+
const openFileContent = this.getOpenFileContents();
|
386
|
+
if (openFileContent) {
|
387
|
+
return openFileContent;
|
388
|
+
}
|
389
|
+
// Otherwise, get content from file system.
|
390
|
+
try {
|
391
|
+
// Check the file's length before attempting to read its full contents.
|
392
|
+
const fileStat = this.fileSystem.statSync(this._filePath);
|
393
|
+
if (fileStat.size > _maxSourceFileSize) {
|
394
|
+
this._console.error(`File length of "${this._filePath}" is ${fileStat.size} ` +
|
395
|
+
`which exceeds the maximum supported file size of ${_maxSourceFileSize}`);
|
396
|
+
throw new Error('File larger than max');
|
397
|
+
}
|
398
|
+
return this.fileSystem.readFileSync(this._filePath, 'utf8');
|
399
|
+
}
|
400
|
+
catch (error) {
|
401
|
+
return undefined;
|
402
|
+
}
|
403
|
+
}
|
404
|
+
setClientVersion(version, contents) {
|
405
|
+
if (version === null) {
|
406
|
+
this._clientDocument = undefined;
|
407
|
+
}
|
408
|
+
else {
|
409
|
+
if (!this._clientDocument) {
|
410
|
+
this._clientDocument = vscode_languageserver_textdocument_1.TextDocument.create(this._filePath, 'python', version, '');
|
411
|
+
}
|
412
|
+
this._clientDocument = vscode_languageserver_textdocument_1.TextDocument.update(this._clientDocument, contents, version);
|
413
|
+
const fileContents = this._clientDocument.getText();
|
414
|
+
const contentsHash = StringUtils.hashString(fileContents);
|
415
|
+
// Have the contents of the file changed?
|
416
|
+
if (fileContents.length !== this._lastFileContentLength || contentsHash !== this._lastFileContentHash) {
|
417
|
+
this.markDirty();
|
418
|
+
}
|
419
|
+
this._lastFileContentLength = fileContents.length;
|
420
|
+
this._lastFileContentHash = contentsHash;
|
421
|
+
this._isFileDeleted = false;
|
422
|
+
}
|
423
|
+
}
|
424
|
+
prepareForClose() {
|
425
|
+
// Nothing to do currently.
|
426
|
+
}
|
427
|
+
isFileDeleted() {
|
428
|
+
return this._isFileDeleted;
|
429
|
+
}
|
430
|
+
isParseRequired() {
|
431
|
+
return !this._parseResults || this._analyzedFileContentsVersion !== this._fileContentsVersion;
|
432
|
+
}
|
433
|
+
isBindingRequired() {
|
434
|
+
if (this._isBindingInProgress) {
|
435
|
+
return false;
|
436
|
+
}
|
437
|
+
if (this.isParseRequired()) {
|
438
|
+
return true;
|
439
|
+
}
|
440
|
+
return this._isBindingNeeded;
|
441
|
+
}
|
442
|
+
isIndexingRequired() {
|
443
|
+
return this._indexingNeeded;
|
444
|
+
}
|
445
|
+
isCheckingRequired() {
|
446
|
+
return this._isCheckingNeeded;
|
447
|
+
}
|
448
|
+
getParseResults() {
|
449
|
+
if (!this.isParseRequired()) {
|
450
|
+
return this._parseResults;
|
451
|
+
}
|
452
|
+
return undefined;
|
453
|
+
}
|
454
|
+
getCachedIndexResults() {
|
455
|
+
return this._cachedIndexResults;
|
456
|
+
}
|
457
|
+
cacheIndexResults(indexResults) {
|
458
|
+
this._cachedIndexResults = indexResults;
|
459
|
+
}
|
460
|
+
// Adds a new circular dependency for this file but only if
|
461
|
+
// it hasn't already been added.
|
462
|
+
addCircularDependency(circDependency) {
|
463
|
+
let updatedDependencyList = false;
|
464
|
+
// Some topologies can result in a massive number of cycles. We'll cut it off.
|
465
|
+
if (this._circularDependencies.length < _maxImportCyclesPerFile) {
|
466
|
+
if (!this._circularDependencies.some((dep) => dep.isEqual(circDependency))) {
|
467
|
+
this._circularDependencies.push(circDependency);
|
468
|
+
updatedDependencyList = true;
|
469
|
+
}
|
470
|
+
}
|
471
|
+
if (updatedDependencyList) {
|
472
|
+
this._diagnosticVersion++;
|
473
|
+
}
|
474
|
+
}
|
475
|
+
setNoCircularDependencyConfirmed() {
|
476
|
+
this._noCircularDependencyConfirmed = true;
|
477
|
+
}
|
478
|
+
isNoCircularDependencyConfirmed() {
|
479
|
+
return !this.isParseRequired() && this._noCircularDependencyConfirmed;
|
480
|
+
}
|
481
|
+
setHitMaxImportDepth(maxImportDepth) {
|
482
|
+
this._hitMaxImportDepth = maxImportDepth;
|
483
|
+
}
|
484
|
+
// Parse the file and update the state. Callers should wait for completion
|
485
|
+
// (or at least cancel) prior to calling again. It returns true if a parse
|
486
|
+
// was required and false if the parse information was up to date already.
|
487
|
+
parse(configOptions, importResolver, content) {
|
488
|
+
return this._logTracker.log(`parsing: ${this._getPathForLogging(this._filePath)}`, (logState) => {
|
489
|
+
var _a;
|
490
|
+
// If the file is already parsed, we can skip.
|
491
|
+
if (!this.isParseRequired()) {
|
492
|
+
logState.suppress();
|
493
|
+
return false;
|
494
|
+
}
|
495
|
+
const diagSink = new diagnosticSink_1.DiagnosticSink();
|
496
|
+
let fileContents = this.getOpenFileContents();
|
497
|
+
if (fileContents === undefined) {
|
498
|
+
try {
|
499
|
+
const startTime = timing_1.timingStats.readFileTime.totalTime;
|
500
|
+
timing_1.timingStats.readFileTime.timeOperation(() => {
|
501
|
+
// Read the file's contents.
|
502
|
+
fileContents = content !== null && content !== void 0 ? content : this.getFileContent();
|
503
|
+
if (fileContents === undefined) {
|
504
|
+
throw new Error("Can't get file content");
|
505
|
+
}
|
506
|
+
// Remember the length and hash for comparison purposes.
|
507
|
+
this._lastFileContentLength = fileContents.length;
|
508
|
+
this._lastFileContentHash = StringUtils.hashString(fileContents);
|
509
|
+
});
|
510
|
+
logState.add(`fs read ${timing_1.timingStats.readFileTime.totalTime - startTime}ms`);
|
511
|
+
}
|
512
|
+
catch (error) {
|
513
|
+
diagSink.addError(`Source file could not be read`, (0, textRange_1.getEmptyRange)());
|
514
|
+
fileContents = '';
|
515
|
+
if (!this.fileSystem.existsSync(this._filePath)) {
|
516
|
+
this._isFileDeleted = true;
|
517
|
+
}
|
518
|
+
}
|
519
|
+
}
|
520
|
+
// Use the configuration options to determine the environment in which
|
521
|
+
// this source file will be executed.
|
522
|
+
const execEnvironment = configOptions.findExecEnvironment(this._filePath);
|
523
|
+
const parseOptions = new parser_1.ParseOptions();
|
524
|
+
parseOptions.ipythonMode = this._ipythonMode;
|
525
|
+
if (this._filePath.endsWith('pyi')) {
|
526
|
+
parseOptions.isStubFile = true;
|
527
|
+
}
|
528
|
+
parseOptions.pythonVersion = execEnvironment.pythonVersion;
|
529
|
+
parseOptions.skipFunctionAndClassBody = (_a = configOptions.indexGenerationMode) !== null && _a !== void 0 ? _a : false;
|
530
|
+
try {
|
531
|
+
// Parse the token stream, building the abstract syntax tree.
|
532
|
+
const parser = new parser_1.Parser();
|
533
|
+
const parseResults = parser.parseSourceFile(fileContents, parseOptions, diagSink);
|
534
|
+
(0, debug_1.assert)(parseResults !== undefined && parseResults.tokenizerOutput !== undefined);
|
535
|
+
this._parseResults = parseResults;
|
536
|
+
this._typeIgnoreLines = this._parseResults.tokenizerOutput.typeIgnoreLines;
|
537
|
+
this._typeIgnoreAll = this._parseResults.tokenizerOutput.typeIgnoreAll;
|
538
|
+
this._pyrightIgnoreLines = this._parseResults.tokenizerOutput.pyrightIgnoreLines;
|
539
|
+
// Resolve imports.
|
540
|
+
timing_1.timingStats.resolveImportsTime.timeOperation(() => {
|
541
|
+
const importResult = this._resolveImports(importResolver, parseResults.importedModules, execEnvironment);
|
542
|
+
this._imports = importResult.imports;
|
543
|
+
this._builtinsImport = importResult.builtinsImportResult;
|
544
|
+
this._ipythonDisplayImport = importResult.ipythonDisplayImportResult;
|
545
|
+
this._parseDiagnostics = diagSink.fetchAndClear();
|
546
|
+
});
|
547
|
+
// Is this file in a "strict" path?
|
548
|
+
const useStrict = configOptions.strict.find((strictFileSpec) => strictFileSpec.regExp.test(this._filePath)) !==
|
549
|
+
undefined;
|
550
|
+
this._diagnosticRuleSet = CommentUtils.getFileLevelDirectives(this._parseResults.tokenizerOutput.tokens, configOptions.diagnosticRuleSet, useStrict);
|
551
|
+
}
|
552
|
+
catch (e) {
|
553
|
+
const message = (e.stack ? e.stack.toString() : undefined) ||
|
554
|
+
(typeof e.message === 'string' ? e.message : undefined) ||
|
555
|
+
JSON.stringify(e);
|
556
|
+
this._console.error(localize_1.Localizer.Diagnostic.internalParseError().format({ file: this.getFilePath(), message }));
|
557
|
+
// Create dummy parse results.
|
558
|
+
this._parseResults = {
|
559
|
+
text: '',
|
560
|
+
parseTree: parseNodes_1.ModuleNode.create({ start: 0, length: 0 }),
|
561
|
+
importedModules: [],
|
562
|
+
futureImports: new Map(),
|
563
|
+
tokenizerOutput: {
|
564
|
+
tokens: new textRangeCollection_1.TextRangeCollection([]),
|
565
|
+
lines: new textRangeCollection_1.TextRangeCollection([]),
|
566
|
+
typeIgnoreAll: undefined,
|
567
|
+
typeIgnoreLines: new Map(),
|
568
|
+
pyrightIgnoreLines: new Map(),
|
569
|
+
predominantEndOfLineSequence: '\n',
|
570
|
+
predominantTabSequence: ' ',
|
571
|
+
predominantSingleQuoteCharacter: "'",
|
572
|
+
},
|
573
|
+
containsWildcardImport: false,
|
574
|
+
typingSymbolAliases: new Map(),
|
575
|
+
};
|
576
|
+
this._imports = undefined;
|
577
|
+
this._builtinsImport = undefined;
|
578
|
+
this._ipythonDisplayImport = undefined;
|
579
|
+
const diagSink = new diagnosticSink_1.DiagnosticSink();
|
580
|
+
diagSink.addError(localize_1.Localizer.Diagnostic.internalParseError().format({ file: this.getFilePath(), message }), (0, textRange_1.getEmptyRange)());
|
581
|
+
this._parseDiagnostics = diagSink.fetchAndClear();
|
582
|
+
// Do not rethrow the exception, swallow it here. Callers are not
|
583
|
+
// prepared to handle an exception.
|
584
|
+
}
|
585
|
+
this._analyzedFileContentsVersion = this._fileContentsVersion;
|
586
|
+
this._indexingNeeded = true;
|
587
|
+
this._isBindingNeeded = true;
|
588
|
+
this._isCheckingNeeded = true;
|
589
|
+
this._parseTreeNeedsCleaning = false;
|
590
|
+
this._hitMaxImportDepth = undefined;
|
591
|
+
this._diagnosticVersion++;
|
592
|
+
return true;
|
593
|
+
});
|
594
|
+
}
|
595
|
+
index(options, token) {
|
596
|
+
return this._logTracker.log(`indexing: ${this._getPathForLogging(this._filePath)}`, (ls) => {
|
597
|
+
// If we have no completed analysis job, there's nothing to do.
|
598
|
+
if (!this._parseResults || !this.isIndexingRequired()) {
|
599
|
+
ls.suppress();
|
600
|
+
return undefined;
|
601
|
+
}
|
602
|
+
this._indexingNeeded = false;
|
603
|
+
const symbols = documentSymbolProvider_1.DocumentSymbolProvider.indexSymbols(AnalyzerNodeInfo.getFileInfo(this._parseResults.parseTree), this._parseResults, options, token);
|
604
|
+
ls.add(`found ${symbols.length}`);
|
605
|
+
const name = (0, pathUtils_1.stripFileExtension)((0, pathUtils_1.getFileName)(this._filePath));
|
606
|
+
const privateOrProtected = SymbolNameUtils.isPrivateOrProtectedName(name);
|
607
|
+
return { privateOrProtected, symbols };
|
608
|
+
});
|
609
|
+
}
|
610
|
+
getDefinitionsForPosition(sourceMapper, position, filter, evaluator, token) {
|
611
|
+
// If we have no completed analysis job, there's nothing to do.
|
612
|
+
if (!this._parseResults) {
|
613
|
+
return undefined;
|
614
|
+
}
|
615
|
+
return definitionProvider_1.DefinitionProvider.getDefinitionsForPosition(sourceMapper, this._parseResults, position, filter, evaluator, token);
|
616
|
+
}
|
617
|
+
getTypeDefinitionsForPosition(sourceMapper, position, evaluator, filePath, token) {
|
618
|
+
// If we have no completed analysis job, there's nothing to do.
|
619
|
+
if (!this._parseResults) {
|
620
|
+
return undefined;
|
621
|
+
}
|
622
|
+
return definitionProvider_1.DefinitionProvider.getTypeDefinitionsForPosition(sourceMapper, this._parseResults, position, evaluator, filePath, token);
|
623
|
+
}
|
624
|
+
getDeclarationForNode(sourceMapper, node, evaluator, reporter, token) {
|
625
|
+
// If we have no completed analysis job, there's nothing to do.
|
626
|
+
if (!this._parseResults) {
|
627
|
+
return undefined;
|
628
|
+
}
|
629
|
+
return referencesProvider_1.ReferencesProvider.getDeclarationForNode(sourceMapper, this._filePath, node, evaluator, reporter, token);
|
630
|
+
}
|
631
|
+
getDeclarationForPosition(sourceMapper, position, evaluator, reporter, token) {
|
632
|
+
// If we have no completed analysis job, there's nothing to do.
|
633
|
+
if (!this._parseResults) {
|
634
|
+
return undefined;
|
635
|
+
}
|
636
|
+
return referencesProvider_1.ReferencesProvider.getDeclarationForPosition(sourceMapper, this._parseResults, this._filePath, position, evaluator, reporter, token);
|
637
|
+
}
|
638
|
+
addReferences(referencesResult, includeDeclaration, evaluator, token) {
|
639
|
+
// If we have no completed analysis job, there's nothing to do.
|
640
|
+
if (!this._parseResults) {
|
641
|
+
return;
|
642
|
+
}
|
643
|
+
referencesProvider_1.ReferencesProvider.addReferences(this._parseResults, this._filePath, referencesResult, includeDeclaration, evaluator, token);
|
644
|
+
}
|
645
|
+
addHierarchicalSymbolsForDocument(symbolList, token) {
|
646
|
+
// If we have no completed analysis job, there's nothing to do.
|
647
|
+
if (!this._parseResults && !this._cachedIndexResults) {
|
648
|
+
return;
|
649
|
+
}
|
650
|
+
documentSymbolProvider_1.DocumentSymbolProvider.addHierarchicalSymbolsForDocument(this._parseResults ? AnalyzerNodeInfo.getFileInfo(this._parseResults.parseTree) : undefined, this.getCachedIndexResults(), this._parseResults, symbolList, token);
|
651
|
+
}
|
652
|
+
getSymbolsForDocument(query, token) {
|
653
|
+
// If we have no completed analysis job, there's nothing to do.
|
654
|
+
if (!this._parseResults && !this._cachedIndexResults) {
|
655
|
+
return [];
|
656
|
+
}
|
657
|
+
return documentSymbolProvider_1.DocumentSymbolProvider.getSymbolsForDocument(this._parseResults ? AnalyzerNodeInfo.getFileInfo(this._parseResults.parseTree) : undefined, this.getCachedIndexResults(), this._parseResults, this._filePath, query, token);
|
658
|
+
}
|
659
|
+
getHoverForPosition(sourceMapper, position, format, evaluator, token) {
|
660
|
+
// If this file hasn't been bound, no hover info is available.
|
661
|
+
if (this._isBindingNeeded || !this._parseResults) {
|
662
|
+
return undefined;
|
663
|
+
}
|
664
|
+
return hoverProvider_1.HoverProvider.getHoverForPosition(sourceMapper, this._parseResults, position, format, evaluator, token);
|
665
|
+
}
|
666
|
+
getDocumentHighlight(sourceMapper, position, evaluator, token) {
|
667
|
+
// If this file hasn't been bound, no hover info is available.
|
668
|
+
if (this._isBindingNeeded || !this._parseResults) {
|
669
|
+
return undefined;
|
670
|
+
}
|
671
|
+
return documentHighlightProvider_1.DocumentHighlightProvider.getDocumentHighlight(this._parseResults, position, evaluator, token);
|
672
|
+
}
|
673
|
+
getSignatureHelpForPosition(position, sourceMapper, evaluator, format, token) {
|
674
|
+
// If we have no completed analysis job, there's nothing to do.
|
675
|
+
if (!this._parseResults) {
|
676
|
+
return undefined;
|
677
|
+
}
|
678
|
+
return signatureHelpProvider_1.SignatureHelpProvider.getSignatureHelpForPosition(this._parseResults, position, sourceMapper, evaluator, format, token);
|
679
|
+
}
|
680
|
+
getCompletionsForPosition(position, workspacePath, configOptions, importResolver, importLookup, evaluator, options, sourceMapper, nameMap, libraryMap, moduleSymbolsCallback, token) {
|
681
|
+
// If we have no completed analysis job, there's nothing to do.
|
682
|
+
if (!this._parseResults) {
|
683
|
+
return undefined;
|
684
|
+
}
|
685
|
+
// This command should be called only for open files, in which
|
686
|
+
// case we should have the file contents already loaded.
|
687
|
+
const fileContents = this.getOpenFileContents();
|
688
|
+
if (fileContents === undefined) {
|
689
|
+
return undefined;
|
690
|
+
}
|
691
|
+
const completionProvider = new completionProvider_1.CompletionProvider(workspacePath, this._parseResults, fileContents, importResolver, position, this._filePath, configOptions, importLookup, evaluator, options, sourceMapper, {
|
692
|
+
nameMap,
|
693
|
+
libraryMap,
|
694
|
+
getModuleSymbolsMap: moduleSymbolsCallback,
|
695
|
+
}, token);
|
696
|
+
return completionProvider.getCompletionsForPosition();
|
697
|
+
}
|
698
|
+
resolveCompletionItem(configOptions, importResolver, importLookup, evaluator, options, sourceMapper, nameMap, libraryMap, moduleSymbolsCallback, completionItem, token) {
|
699
|
+
const fileContents = this.getOpenFileContents();
|
700
|
+
if (!this._parseResults || fileContents === undefined) {
|
701
|
+
return;
|
702
|
+
}
|
703
|
+
const completionData = (0, lspUtils_1.fromLSPAny)(completionItem.data);
|
704
|
+
const completionProvider = new completionProvider_1.CompletionProvider(completionData.workspacePath, this._parseResults, fileContents, importResolver, completionData.position, this._filePath, configOptions, importLookup, evaluator, options, sourceMapper, {
|
705
|
+
nameMap,
|
706
|
+
libraryMap,
|
707
|
+
getModuleSymbolsMap: moduleSymbolsCallback,
|
708
|
+
}, token);
|
709
|
+
completionProvider.resolveCompletionItem(completionItem);
|
710
|
+
}
|
711
|
+
performQuickAction(command, args, token) {
|
712
|
+
// If we have no completed analysis job, there's nothing to do.
|
713
|
+
if (!this._parseResults) {
|
714
|
+
return undefined;
|
715
|
+
}
|
716
|
+
// This command should be called only for open files, in which
|
717
|
+
// case we should have the file contents already loaded.
|
718
|
+
if (this.getClientVersion() === undefined) {
|
719
|
+
return undefined;
|
720
|
+
}
|
721
|
+
return (0, quickActions_1.performQuickAction)(command, args, this._parseResults, token);
|
722
|
+
}
|
723
|
+
bind(configOptions, importLookup, builtinsScope) {
|
724
|
+
(0, debug_1.assert)(!this.isParseRequired(), 'Bind called before parsing');
|
725
|
+
(0, debug_1.assert)(this.isBindingRequired(), 'Bind called unnecessarily');
|
726
|
+
(0, debug_1.assert)(!this._isBindingInProgress, 'Bind called while binding in progress');
|
727
|
+
(0, debug_1.assert)(this._parseResults !== undefined, 'Parse results not available');
|
728
|
+
return this._logTracker.log(`binding: ${this._getPathForLogging(this._filePath)}`, () => {
|
729
|
+
try {
|
730
|
+
// Perform name binding.
|
731
|
+
timing_1.timingStats.bindTime.timeOperation(() => {
|
732
|
+
this._cleanParseTreeIfRequired();
|
733
|
+
const fileInfo = this._buildFileInfo(configOptions, this._parseResults.text, importLookup, builtinsScope);
|
734
|
+
AnalyzerNodeInfo.setFileInfo(this._parseResults.parseTree, fileInfo);
|
735
|
+
const binder = new binder_1.Binder(fileInfo, configOptions.indexGenerationMode);
|
736
|
+
this._isBindingInProgress = true;
|
737
|
+
binder.bindModule(this._parseResults.parseTree);
|
738
|
+
// If we're in "test mode" (used for unit testing), run an additional
|
739
|
+
// "test walker" over the parse tree to validate its internal consistency.
|
740
|
+
if (configOptions.internalTestMode) {
|
741
|
+
const testWalker = new testWalker_1.TestWalker();
|
742
|
+
testWalker.walk(this._parseResults.parseTree);
|
743
|
+
}
|
744
|
+
this._bindDiagnostics = fileInfo.diagnosticSink.fetchAndClear();
|
745
|
+
const moduleScope = AnalyzerNodeInfo.getScope(this._parseResults.parseTree);
|
746
|
+
(0, debug_1.assert)(moduleScope !== undefined, 'Module scope not returned by binder');
|
747
|
+
this._moduleSymbolTable = moduleScope.symbolTable;
|
748
|
+
});
|
749
|
+
}
|
750
|
+
catch (e) {
|
751
|
+
const message = (e.stack ? e.stack.toString() : undefined) ||
|
752
|
+
(typeof e.message === 'string' ? e.message : undefined) ||
|
753
|
+
JSON.stringify(e);
|
754
|
+
this._console.error(localize_1.Localizer.Diagnostic.internalBindError().format({ file: this.getFilePath(), message }));
|
755
|
+
const diagSink = new diagnosticSink_1.DiagnosticSink();
|
756
|
+
diagSink.addError(localize_1.Localizer.Diagnostic.internalBindError().format({ file: this.getFilePath(), message }), (0, textRange_1.getEmptyRange)());
|
757
|
+
this._bindDiagnostics = diagSink.fetchAndClear();
|
758
|
+
// Do not rethrow the exception, swallow it here. Callers are not
|
759
|
+
// prepared to handle an exception.
|
760
|
+
}
|
761
|
+
finally {
|
762
|
+
this._isBindingInProgress = false;
|
763
|
+
}
|
764
|
+
// Prepare for the next stage of the analysis.
|
765
|
+
this._diagnosticVersion++;
|
766
|
+
this._isCheckingNeeded = true;
|
767
|
+
this._indexingNeeded = true;
|
768
|
+
this._isBindingNeeded = false;
|
769
|
+
});
|
770
|
+
}
|
771
|
+
check(importResolver, evaluator) {
|
772
|
+
(0, debug_1.assert)(!this.isParseRequired(), 'Check called before parsing');
|
773
|
+
(0, debug_1.assert)(!this.isBindingRequired(), 'Check called before binding');
|
774
|
+
(0, debug_1.assert)(!this._isBindingInProgress, 'Check called while binding in progress');
|
775
|
+
(0, debug_1.assert)(this.isCheckingRequired(), 'Check called unnecessarily');
|
776
|
+
(0, debug_1.assert)(this._parseResults !== undefined, 'Parse results not available');
|
777
|
+
return this._logTracker.log(`checking: ${this._getPathForLogging(this._filePath)}`, () => {
|
778
|
+
try {
|
779
|
+
timing_1.timingStats.typeCheckerTime.timeOperation(() => {
|
780
|
+
const checkDuration = new timing_1.Duration();
|
781
|
+
const checker = new checker_1.Checker(importResolver, evaluator, this._parseResults.parseTree);
|
782
|
+
checker.check();
|
783
|
+
this._isCheckingNeeded = false;
|
784
|
+
const fileInfo = AnalyzerNodeInfo.getFileInfo(this._parseResults.parseTree);
|
785
|
+
this._checkerDiagnostics = fileInfo.diagnosticSink.fetchAndClear();
|
786
|
+
this._checkTime = checkDuration.getDurationInMilliseconds();
|
787
|
+
});
|
788
|
+
}
|
789
|
+
catch (e) {
|
790
|
+
const isCancellation = cancellationUtils_1.OperationCanceledException.is(e);
|
791
|
+
if (!isCancellation) {
|
792
|
+
const message = (e.stack ? e.stack.toString() : undefined) ||
|
793
|
+
(typeof e.message === 'string' ? e.message : undefined) ||
|
794
|
+
JSON.stringify(e);
|
795
|
+
this._console.error(localize_1.Localizer.Diagnostic.internalTypeCheckingError().format({ file: this.getFilePath(), message }));
|
796
|
+
const diagSink = new diagnosticSink_1.DiagnosticSink();
|
797
|
+
diagSink.addError(localize_1.Localizer.Diagnostic.internalTypeCheckingError().format({ file: this.getFilePath(), message }), (0, textRange_1.getEmptyRange)());
|
798
|
+
this._checkerDiagnostics = diagSink.fetchAndClear();
|
799
|
+
// Mark the file as complete so we don't get into an infinite loop.
|
800
|
+
this._isCheckingNeeded = false;
|
801
|
+
}
|
802
|
+
throw e;
|
803
|
+
}
|
804
|
+
finally {
|
805
|
+
// Clear any circular dependencies associated with this file.
|
806
|
+
// These will be detected by the program module and associated
|
807
|
+
// with the source file right before it is finalized.
|
808
|
+
this._circularDependencies = [];
|
809
|
+
this._diagnosticVersion++;
|
810
|
+
}
|
811
|
+
});
|
812
|
+
}
|
813
|
+
test_enableIPythonMode(enable) {
|
814
|
+
this._ipythonMode = enable;
|
815
|
+
}
|
816
|
+
_buildFileInfo(configOptions, fileContents, importLookup, builtinsScope) {
|
817
|
+
(0, debug_1.assert)(this._parseResults !== undefined, 'Parse results not available');
|
818
|
+
const analysisDiagnostics = new diagnosticSink_1.TextRangeDiagnosticSink(this._parseResults.tokenizerOutput.lines);
|
819
|
+
const fileInfo = {
|
820
|
+
importLookup,
|
821
|
+
futureImports: this._parseResults.futureImports,
|
822
|
+
builtinsScope,
|
823
|
+
diagnosticSink: analysisDiagnostics,
|
824
|
+
executionEnvironment: configOptions.findExecEnvironment(this._filePath),
|
825
|
+
diagnosticRuleSet: this._diagnosticRuleSet,
|
826
|
+
fileContents,
|
827
|
+
lines: this._parseResults.tokenizerOutput.lines,
|
828
|
+
typingSymbolAliases: this._parseResults.typingSymbolAliases,
|
829
|
+
definedConstants: configOptions.defineConstant,
|
830
|
+
filePath: this._filePath,
|
831
|
+
moduleName: this._moduleName,
|
832
|
+
isStubFile: this._isStubFile,
|
833
|
+
isTypingStubFile: this._isTypingStubFile,
|
834
|
+
isTypingExtensionsStubFile: this._isTypingExtensionsStubFile,
|
835
|
+
isBuiltInStubFile: this._isBuiltInStubFile,
|
836
|
+
isInPyTypedPackage: this._isThirdPartyPyTypedPresent,
|
837
|
+
isIPythonMode: this._ipythonMode,
|
838
|
+
accessedSymbolMap: new Map(),
|
839
|
+
};
|
840
|
+
return fileInfo;
|
841
|
+
}
|
842
|
+
_cleanParseTreeIfRequired() {
|
843
|
+
if (this._parseResults) {
|
844
|
+
if (this._parseTreeNeedsCleaning) {
|
845
|
+
const cleanerWalker = new parseTreeCleaner_1.ParseTreeCleanerWalker(this._parseResults.parseTree);
|
846
|
+
cleanerWalker.clean();
|
847
|
+
this._parseTreeNeedsCleaning = false;
|
848
|
+
}
|
849
|
+
}
|
850
|
+
}
|
851
|
+
_resolveImports(importResolver, moduleImports, execEnv) {
|
852
|
+
const imports = [];
|
853
|
+
const resolveAndAddIfNotSelf = (nameParts, skipMissingImport = false) => {
|
854
|
+
const importResult = importResolver.resolveImport(this._filePath, execEnv, {
|
855
|
+
leadingDots: 0,
|
856
|
+
nameParts,
|
857
|
+
importedSymbols: undefined,
|
858
|
+
});
|
859
|
+
if (skipMissingImport && !importResult.isImportFound) {
|
860
|
+
return undefined;
|
861
|
+
}
|
862
|
+
// Avoid importing module from the module file itself.
|
863
|
+
if (importResult.resolvedPaths.length === 0 || importResult.resolvedPaths[0] !== this._filePath) {
|
864
|
+
imports.push(importResult);
|
865
|
+
return importResult;
|
866
|
+
}
|
867
|
+
return undefined;
|
868
|
+
};
|
869
|
+
// Always include an implicit import of the builtins module.
|
870
|
+
let builtinsImportResult;
|
871
|
+
// If this is a project source file (not a stub), try to resolve
|
872
|
+
// the __builtins__ stub first.
|
873
|
+
if (!this._isThirdPartyImport && !this._isStubFile) {
|
874
|
+
builtinsImportResult = resolveAndAddIfNotSelf(['__builtins__'], /* skipMissingImport */ true);
|
875
|
+
}
|
876
|
+
if (!builtinsImportResult) {
|
877
|
+
builtinsImportResult = resolveAndAddIfNotSelf(['builtins']);
|
878
|
+
}
|
879
|
+
const ipythonDisplayImportResult = this._ipythonMode
|
880
|
+
? resolveAndAddIfNotSelf(['IPython', 'display'])
|
881
|
+
: undefined;
|
882
|
+
for (const moduleImport of moduleImports) {
|
883
|
+
const importResult = importResolver.resolveImport(this._filePath, execEnv, {
|
884
|
+
leadingDots: moduleImport.leadingDots,
|
885
|
+
nameParts: moduleImport.nameParts,
|
886
|
+
importedSymbols: moduleImport.importedSymbols,
|
887
|
+
});
|
888
|
+
imports.push(importResult);
|
889
|
+
// Associate the import results with the module import
|
890
|
+
// name node in the parse tree so we can access it later
|
891
|
+
// (for hover and definition support).
|
892
|
+
AnalyzerNodeInfo.setImportInfo(moduleImport.nameNode, importResult);
|
893
|
+
}
|
894
|
+
return {
|
895
|
+
imports,
|
896
|
+
builtinsImportResult,
|
897
|
+
ipythonDisplayImportResult,
|
898
|
+
};
|
899
|
+
}
|
900
|
+
_getPathForLogging(filepath) {
|
901
|
+
if (this.fileSystem.isMappedFilePath(filepath)) {
|
902
|
+
return this.fileSystem.getOriginalFilePath(filepath);
|
903
|
+
}
|
904
|
+
return filepath;
|
905
|
+
}
|
906
|
+
}
|
907
|
+
exports.SourceFile = SourceFile;
|
908
|
+
//# sourceMappingURL=sourceFile.js.map
|