@zzzen/pyright-internal 1.2.0-dev.20231126 → 1.2.0-dev.20231210
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/analyzerFileInfo.d.ts +4 -3
- package/dist/analyzer/analyzerFileInfo.js.map +1 -1
- package/dist/analyzer/backgroundAnalysisProgram.d.ts +15 -14
- package/dist/analyzer/backgroundAnalysisProgram.js +38 -38
- package/dist/analyzer/backgroundAnalysisProgram.js.map +1 -1
- package/dist/analyzer/binder.js +59 -52
- package/dist/analyzer/binder.js.map +1 -1
- package/dist/analyzer/checker.d.ts +4 -1
- package/dist/analyzer/checker.js +189 -42
- package/dist/analyzer/checker.js.map +1 -1
- package/dist/analyzer/circularDependency.d.ts +3 -2
- package/dist/analyzer/circularDependency.js.map +1 -1
- package/dist/analyzer/codeFlowEngine.js +36 -36
- package/dist/analyzer/codeFlowEngine.js.map +1 -1
- package/dist/analyzer/commentUtils.js +7 -0
- package/dist/analyzer/commentUtils.js.map +1 -1
- package/dist/analyzer/constraintSolver.js +14 -5
- package/dist/analyzer/constraintSolver.js.map +1 -1
- package/dist/analyzer/constructors.js +2 -1
- package/dist/analyzer/constructors.js.map +1 -1
- package/dist/analyzer/dataClasses.js +58 -47
- package/dist/analyzer/dataClasses.js.map +1 -1
- package/dist/analyzer/declaration.d.ts +5 -3
- package/dist/analyzer/declaration.js +3 -2
- package/dist/analyzer/declaration.js.map +1 -1
- package/dist/analyzer/declarationUtils.d.ts +3 -2
- package/dist/analyzer/declarationUtils.js +14 -12
- package/dist/analyzer/declarationUtils.js.map +1 -1
- package/dist/analyzer/enums.js +1 -1
- package/dist/analyzer/enums.js.map +1 -1
- package/dist/analyzer/importResolver.d.ts +29 -25
- package/dist/analyzer/importResolver.js +300 -301
- package/dist/analyzer/importResolver.js.map +1 -1
- package/dist/analyzer/importResult.d.ts +5 -4
- package/dist/analyzer/importResult.js.map +1 -1
- package/dist/analyzer/importStatementUtils.d.ts +5 -4
- package/dist/analyzer/importStatementUtils.js +23 -22
- package/dist/analyzer/importStatementUtils.js.map +1 -1
- package/dist/analyzer/namedTuples.js +3 -3
- package/dist/analyzer/namedTuples.js.map +1 -1
- package/dist/analyzer/operations.js +16 -14
- package/dist/analyzer/operations.js.map +1 -1
- package/dist/analyzer/packageTypeReport.d.ts +7 -6
- package/dist/analyzer/packageTypeReport.js +4 -4
- package/dist/analyzer/packageTypeReport.js.map +1 -1
- package/dist/analyzer/packageTypeVerifier.js +68 -64
- package/dist/analyzer/packageTypeVerifier.js.map +1 -1
- package/dist/analyzer/parentDirectoryCache.d.ts +7 -6
- package/dist/analyzer/parentDirectoryCache.js +9 -10
- package/dist/analyzer/parentDirectoryCache.js.map +1 -1
- package/dist/analyzer/parseTreeUtils.d.ts +1 -1
- package/dist/analyzer/parseTreeUtils.js +6 -3
- package/dist/analyzer/parseTreeUtils.js.map +1 -1
- package/dist/analyzer/patternMatching.js +79 -14
- package/dist/analyzer/patternMatching.js.map +1 -1
- package/dist/analyzer/program.d.ts +27 -26
- package/dist/analyzer/program.js +162 -156
- package/dist/analyzer/program.js.map +1 -1
- package/dist/analyzer/properties.js +3 -3
- package/dist/analyzer/properties.js.map +1 -1
- package/dist/analyzer/protocols.js +27 -13
- package/dist/analyzer/protocols.js.map +1 -1
- package/dist/analyzer/pyTypedUtils.d.ts +3 -2
- package/dist/analyzer/pyTypedUtils.js +4 -5
- package/dist/analyzer/pyTypedUtils.js.map +1 -1
- package/dist/analyzer/pythonPathUtils.d.ts +7 -6
- package/dist/analyzer/pythonPathUtils.js +21 -23
- package/dist/analyzer/pythonPathUtils.js.map +1 -1
- package/dist/analyzer/service.d.ts +24 -23
- package/dist/analyzer/service.js +187 -183
- package/dist/analyzer/service.js.map +1 -1
- package/dist/analyzer/sourceFile.d.ts +4 -5
- package/dist/analyzer/sourceFile.js +68 -56
- package/dist/analyzer/sourceFile.js.map +1 -1
- package/dist/analyzer/sourceFileInfoUtils.js +3 -3
- package/dist/analyzer/sourceFileInfoUtils.js.map +1 -1
- package/dist/analyzer/sourceMapper.d.ts +11 -10
- package/dist/analyzer/sourceMapper.js +59 -62
- package/dist/analyzer/sourceMapper.js.map +1 -1
- package/dist/analyzer/sourceMapperUtils.d.ts +2 -1
- package/dist/analyzer/sourceMapperUtils.js +2 -2
- package/dist/analyzer/sourceMapperUtils.js.map +1 -1
- package/dist/analyzer/tracePrinter.d.ts +3 -2
- package/dist/analyzer/tracePrinter.js +21 -23
- package/dist/analyzer/tracePrinter.js.map +1 -1
- package/dist/analyzer/typeDocStringUtils.d.ts +2 -1
- package/dist/analyzer/typeDocStringUtils.js +14 -17
- package/dist/analyzer/typeDocStringUtils.js.map +1 -1
- package/dist/analyzer/typeEvaluator.js +298 -231
- package/dist/analyzer/typeEvaluator.js.map +1 -1
- package/dist/analyzer/typeEvaluatorTypes.d.ts +1 -1
- package/dist/analyzer/typeEvaluatorTypes.js +1 -1
- package/dist/analyzer/typeEvaluatorTypes.js.map +1 -1
- package/dist/analyzer/typeGuards.js +3 -3
- package/dist/analyzer/typeGuards.js.map +1 -1
- package/dist/analyzer/typePrinter.d.ts +2 -0
- package/dist/analyzer/typePrinter.js +48 -8
- package/dist/analyzer/typePrinter.js.map +1 -1
- package/dist/analyzer/typeStubWriter.d.ts +2 -1
- package/dist/analyzer/typeStubWriter.js +2 -2
- package/dist/analyzer/typeStubWriter.js.map +1 -1
- package/dist/analyzer/typeUtils.d.ts +5 -3
- package/dist/analyzer/typeUtils.js +32 -17
- package/dist/analyzer/typeUtils.js.map +1 -1
- package/dist/analyzer/typeVarContext.d.ts +2 -0
- package/dist/analyzer/typeVarContext.js +27 -0
- package/dist/analyzer/typeVarContext.js.map +1 -1
- package/dist/analyzer/typedDicts.js +6 -36
- package/dist/analyzer/typedDicts.js.map +1 -1
- package/dist/analyzer/types.d.ts +8 -12
- package/dist/analyzer/types.js +13 -20
- package/dist/analyzer/types.js.map +1 -1
- package/dist/backgroundAnalysis.d.ts +1 -2
- package/dist/backgroundAnalysis.js +6 -4
- package/dist/backgroundAnalysis.js.map +1 -1
- package/dist/backgroundAnalysisBase.d.ts +22 -20
- package/dist/backgroundAnalysisBase.js +76 -55
- package/dist/backgroundAnalysisBase.js.map +1 -1
- package/dist/backgroundThreadBase.d.ts +1 -1
- package/dist/backgroundThreadBase.js +20 -11
- package/dist/backgroundThreadBase.js.map +1 -1
- package/dist/commands/commandController.js +1 -2
- package/dist/commands/commandController.js.map +1 -1
- package/dist/commands/commands.d.ts +0 -1
- package/dist/commands/commands.js +0 -1
- package/dist/commands/commands.js.map +1 -1
- package/dist/commands/createTypeStub.js +3 -2
- package/dist/commands/createTypeStub.js.map +1 -1
- package/dist/commands/dumpFileDebugInfoCommand.js +21 -20
- package/dist/commands/dumpFileDebugInfoCommand.js.map +1 -1
- package/dist/commands/quickActionCommand.js +5 -5
- package/dist/commands/quickActionCommand.js.map +1 -1
- package/dist/common/configOptions.d.ts +15 -13
- package/dist/common/configOptions.js +120 -30
- package/dist/common/configOptions.js.map +1 -1
- package/dist/common/diagnostic.d.ts +6 -9
- package/dist/common/diagnostic.js +2 -2
- package/dist/common/diagnostic.js.map +1 -1
- package/dist/common/diagnosticSink.d.ts +2 -1
- package/dist/common/diagnosticSink.js.map +1 -1
- package/dist/common/editAction.d.ts +6 -5
- package/dist/common/editAction.js +2 -2
- package/dist/common/editAction.js.map +1 -1
- package/dist/common/envVarUtils.d.ts +2 -1
- package/dist/common/envVarUtils.js +20 -28
- package/dist/common/envVarUtils.js.map +1 -1
- package/dist/common/extensibility.d.ts +19 -19
- package/dist/common/extensibility.js.map +1 -1
- package/dist/common/fileSystem.d.ts +29 -28
- package/dist/common/fileWatcher.d.ts +3 -2
- package/dist/common/fileWatcher.js.map +1 -1
- package/dist/common/fullAccessHost.d.ts +8 -7
- package/dist/common/fullAccessHost.js +21 -16
- package/dist/common/fullAccessHost.js.map +1 -1
- package/dist/common/host.d.ts +7 -6
- package/dist/common/host.js +1 -1
- package/dist/common/host.js.map +1 -1
- package/dist/common/logTracker.d.ts +2 -1
- package/dist/common/logTracker.js +4 -4
- package/dist/common/logTracker.js.map +1 -1
- package/dist/common/pathUtils.d.ts +1 -28
- package/dist/common/pathUtils.js +17 -366
- package/dist/common/pathUtils.js.map +1 -1
- package/dist/common/realFileSystem.d.ts +7 -3
- package/dist/common/realFileSystem.js +78 -60
- package/dist/common/realFileSystem.js.map +1 -1
- package/dist/common/serviceProviderExtensions.d.ts +2 -1
- package/dist/common/serviceProviderExtensions.js +5 -2
- package/dist/common/serviceProviderExtensions.js.map +1 -1
- package/dist/common/textEditTracker.d.ts +2 -1
- package/dist/common/textEditTracker.js +28 -28
- package/dist/common/textEditTracker.js.map +1 -1
- package/dist/common/textRange.d.ts +2 -1
- package/dist/common/textRange.js.map +1 -1
- package/dist/common/uri/baseUri.d.ts +51 -0
- package/dist/common/uri/baseUri.js +194 -0
- package/dist/common/uri/baseUri.js.map +1 -0
- package/dist/common/uri/emptyUri.d.ts +32 -0
- package/dist/common/uri/emptyUri.js +122 -0
- package/dist/common/uri/emptyUri.js.map +1 -0
- package/dist/common/uri/fileUri.d.ts +36 -0
- package/dist/common/uri/fileUri.js +180 -0
- package/dist/common/uri/fileUri.js.map +1 -0
- package/dist/common/uri/memoization.d.ts +3 -0
- package/dist/common/uri/memoization.js +72 -0
- package/dist/common/uri/memoization.js.map +1 -0
- package/dist/common/uri/uri.d.ts +50 -0
- package/dist/common/uri/uri.js +104 -0
- package/dist/common/uri/uri.js.map +1 -0
- package/dist/common/uri/uriUtils.d.ts +39 -0
- package/dist/common/uri/uriUtils.js +362 -0
- package/dist/common/uri/uriUtils.js.map +1 -0
- package/dist/common/uri/webUri.d.ts +36 -0
- package/dist/common/uri/webUri.js +207 -0
- package/dist/common/uri/webUri.js.map +1 -0
- package/dist/common/workspaceEditUtils.d.ts +8 -8
- package/dist/common/workspaceEditUtils.js +34 -37
- package/dist/common/workspaceEditUtils.js.map +1 -1
- package/dist/languageServerBase.d.ts +19 -22
- package/dist/languageServerBase.js +91 -95
- package/dist/languageServerBase.js.map +1 -1
- package/dist/languageService/analyzerServiceExecutor.d.ts +2 -1
- package/dist/languageService/analyzerServiceExecutor.js +14 -16
- package/dist/languageService/analyzerServiceExecutor.js.map +1 -1
- package/dist/languageService/autoImporter.d.ts +11 -9
- package/dist/languageService/autoImporter.js +45 -44
- package/dist/languageService/autoImporter.js.map +1 -1
- package/dist/languageService/callHierarchyProvider.d.ts +3 -2
- package/dist/languageService/callHierarchyProvider.js +23 -35
- package/dist/languageService/callHierarchyProvider.js.map +1 -1
- package/dist/languageService/codeActionProvider.d.ts +2 -1
- package/dist/languageService/codeActionProvider.js +8 -24
- package/dist/languageService/codeActionProvider.js.map +1 -1
- package/dist/languageService/completionProvider.d.ts +7 -6
- package/dist/languageService/completionProvider.js +32 -30
- package/dist/languageService/completionProvider.js.map +1 -1
- package/dist/languageService/completionProviderUtils.d.ts +2 -1
- package/dist/languageService/completionProviderUtils.js +1 -1
- package/dist/languageService/completionProviderUtils.js.map +1 -1
- package/dist/languageService/definitionProvider.d.ts +4 -3
- package/dist/languageService/definitionProvider.js +26 -24
- package/dist/languageService/definitionProvider.js.map +1 -1
- package/dist/languageService/documentHighlightProvider.d.ts +3 -2
- package/dist/languageService/documentHighlightProvider.js +3 -3
- package/dist/languageService/documentHighlightProvider.js.map +1 -1
- package/dist/languageService/documentSymbolCollector.js +8 -7
- package/dist/languageService/documentSymbolCollector.js.map +1 -1
- package/dist/languageService/documentSymbolProvider.d.ts +5 -4
- package/dist/languageService/documentSymbolProvider.js +9 -11
- package/dist/languageService/documentSymbolProvider.js.map +1 -1
- package/dist/languageService/hoverProvider.d.ts +4 -3
- package/dist/languageService/hoverProvider.js +6 -5
- package/dist/languageService/hoverProvider.js.map +1 -1
- package/dist/languageService/navigationUtils.d.ts +2 -1
- package/dist/languageService/navigationUtils.js +2 -3
- package/dist/languageService/navigationUtils.js.map +1 -1
- package/dist/languageService/quickActions.d.ts +2 -2
- package/dist/languageService/quickActions.js +3 -83
- package/dist/languageService/quickActions.js.map +1 -1
- package/dist/languageService/referencesProvider.d.ts +10 -9
- package/dist/languageService/referencesProvider.js +28 -28
- package/dist/languageService/referencesProvider.js.map +1 -1
- package/dist/languageService/renameProvider.d.ts +4 -3
- package/dist/languageService/renameProvider.js +17 -18
- package/dist/languageService/renameProvider.js.map +1 -1
- package/dist/languageService/signatureHelpProvider.d.ts +3 -2
- package/dist/languageService/signatureHelpProvider.js +4 -4
- package/dist/languageService/signatureHelpProvider.js.map +1 -1
- package/dist/languageService/symbolIndexer.d.ts +2 -1
- package/dist/languageService/symbolIndexer.js +1 -1
- package/dist/languageService/symbolIndexer.js.map +1 -1
- package/dist/languageService/tooltipUtils.js +10 -4
- package/dist/languageService/tooltipUtils.js.map +1 -1
- package/dist/languageService/workspaceSymbolProvider.d.ts +4 -3
- package/dist/languageService/workspaceSymbolProvider.js +10 -11
- package/dist/languageService/workspaceSymbolProvider.js.map +1 -1
- package/dist/localization/localize.d.ts +13 -9
- package/dist/localization/localize.js +7 -4
- package/dist/localization/localize.js.map +1 -1
- package/dist/localization/package.nls.cs.json +0 -4
- package/dist/localization/package.nls.de.json +0 -4
- package/dist/localization/package.nls.en-us.json +9 -6
- package/dist/localization/package.nls.es.json +2 -6
- package/dist/localization/package.nls.fr.json +0 -4
- package/dist/localization/package.nls.it.json +0 -4
- package/dist/localization/package.nls.ja.json +0 -4
- package/dist/localization/package.nls.ko.json +0 -4
- package/dist/localization/package.nls.pl.json +0 -4
- package/dist/localization/package.nls.pt-br.json +0 -4
- package/dist/localization/package.nls.qps-ploc.json +0 -4
- package/dist/localization/package.nls.ru.json +0 -4
- package/dist/localization/package.nls.tr.json +0 -4
- package/dist/localization/package.nls.zh-cn.json +0 -4
- package/dist/localization/package.nls.zh-tw.json +0 -4
- package/dist/pyright.js +18 -17
- package/dist/pyright.js.map +1 -1
- package/dist/pyrightFileSystem.d.ts +13 -13
- package/dist/pyrightFileSystem.js +39 -44
- package/dist/pyrightFileSystem.js.map +1 -1
- package/dist/readonlyAugmentedFileSystem.d.ts +29 -28
- package/dist/readonlyAugmentedFileSystem.js +68 -61
- package/dist/readonlyAugmentedFileSystem.js.map +1 -1
- package/dist/server.js +22 -21
- package/dist/server.js.map +1 -1
- package/dist/tests/chainedSourceFiles.test.js +39 -30
- package/dist/tests/chainedSourceFiles.test.js.map +1 -1
- package/dist/tests/checker.test.js +38 -29
- package/dist/tests/checker.test.js.map +1 -1
- package/dist/tests/completions.test.js +7 -3
- package/dist/tests/completions.test.js.map +1 -1
- package/dist/tests/config.test.js +24 -22
- package/dist/tests/config.test.js.map +1 -1
- package/dist/tests/documentSymbolCollector.test.js +3 -2
- package/dist/tests/documentSymbolCollector.test.js.map +1 -1
- package/dist/tests/filesystem.test.js +37 -35
- package/dist/tests/filesystem.test.js.map +1 -1
- package/dist/tests/fourSlashParser.test.js +4 -4
- package/dist/tests/fourSlashParser.test.js.map +1 -1
- package/dist/tests/fourslash/fourslash.d.ts +1 -2
- package/dist/tests/fourslash/hover.docstring.alias.fourslash.js +27 -11
- package/dist/tests/fourslash/hover.docstring.alias.fourslash.js.map +1 -1
- package/dist/tests/harness/fourslash/fourSlashParser.js +2 -2
- package/dist/tests/harness/fourslash/fourSlashParser.js.map +1 -1
- package/dist/tests/harness/fourslash/testLanguageService.d.ts +4 -5
- package/dist/tests/harness/fourslash/testLanguageService.js +9 -15
- package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -1
- package/dist/tests/harness/fourslash/testState.Consts.d.ts +1 -2
- package/dist/tests/harness/fourslash/testState.Consts.js +0 -1
- package/dist/tests/harness/fourslash/testState.Consts.js.map +1 -1
- package/dist/tests/harness/fourslash/testState.d.ts +4 -4
- package/dist/tests/harness/fourslash/testState.js +92 -52
- package/dist/tests/harness/fourslash/testState.js.map +1 -1
- package/dist/tests/harness/testAccessHost.d.ts +3 -2
- package/dist/tests/harness/testAccessHost.js +2 -1
- package/dist/tests/harness/testAccessHost.js.map +1 -1
- package/dist/tests/harness/testHost.js +13 -11
- package/dist/tests/harness/testHost.js.map +1 -1
- package/dist/tests/harness/vfs/factory.d.ts +3 -2
- package/dist/tests/harness/vfs/factory.js +5 -4
- package/dist/tests/harness/vfs/factory.js.map +1 -1
- package/dist/tests/harness/vfs/filesystem.d.ts +32 -31
- package/dist/tests/harness/vfs/filesystem.js +47 -49
- package/dist/tests/harness/vfs/filesystem.js.map +1 -1
- package/dist/tests/harness/vfs/pathValidation.js +1 -10
- package/dist/tests/harness/vfs/pathValidation.js.map +1 -1
- package/dist/tests/importResolver.test.js +81 -58
- package/dist/tests/importResolver.test.js.map +1 -1
- package/dist/tests/importStatementUtils.test.js +10 -9
- package/dist/tests/importStatementUtils.test.js.map +1 -1
- package/dist/tests/ipythonMode.test.js +12 -11
- package/dist/tests/ipythonMode.test.js.map +1 -1
- package/dist/tests/logger.test.js +2 -1
- package/dist/tests/logger.test.js.map +1 -1
- package/dist/tests/parseTreeUtils.test.js +2 -1
- package/dist/tests/parseTreeUtils.test.js.map +1 -1
- package/dist/tests/pathUtils.test.js +3 -138
- package/dist/tests/pathUtils.test.js.map +1 -1
- package/dist/tests/pyrightFileSystem.test.js +76 -25
- package/dist/tests/pyrightFileSystem.test.js.map +1 -1
- package/dist/tests/service.test.js +37 -42
- package/dist/tests/service.test.js.map +1 -1
- package/dist/tests/signatureHelp.test.js +3 -2
- package/dist/tests/signatureHelp.test.js.map +1 -1
- package/dist/tests/sourceFile.test.js +8 -7
- package/dist/tests/sourceFile.test.js.map +1 -1
- package/dist/tests/sourceMapperUtils.test.js +13 -6
- package/dist/tests/sourceMapperUtils.test.js.map +1 -1
- package/dist/tests/testState.test.js +13 -9
- package/dist/tests/testState.test.js.map +1 -1
- package/dist/tests/testStateUtils.d.ts +2 -5
- package/dist/tests/testStateUtils.js +27 -64
- package/dist/tests/testStateUtils.js.map +1 -1
- package/dist/tests/testUtils.d.ts +3 -5
- package/dist/tests/testUtils.js +15 -64
- package/dist/tests/testUtils.js.map +1 -1
- package/dist/tests/textEditUtil.test.js +4 -3
- package/dist/tests/textEditUtil.test.js.map +1 -1
- package/dist/tests/typeEvaluator1.test.js +23 -19
- package/dist/tests/typeEvaluator1.test.js.map +1 -1
- package/dist/tests/typeEvaluator2.test.js +21 -12
- package/dist/tests/typeEvaluator2.test.js.map +1 -1
- package/dist/tests/typeEvaluator3.test.js +84 -70
- package/dist/tests/typeEvaluator3.test.js.map +1 -1
- package/dist/tests/typeEvaluator4.test.js +26 -21
- package/dist/tests/typeEvaluator4.test.js.map +1 -1
- package/dist/tests/typeEvaluator5.test.js +36 -31
- package/dist/tests/typeEvaluator5.test.js.map +1 -1
- package/dist/tests/typePrinter.test.js +4 -3
- package/dist/tests/typePrinter.test.js.map +1 -1
- package/dist/tests/uri.test.d.ts +1 -0
- package/dist/tests/uri.test.js +695 -0
- package/dist/tests/uri.test.js.map +1 -0
- package/dist/tests/workspaceEditUtils.test.js +28 -28
- package/dist/tests/workspaceEditUtils.test.js.map +1 -1
- package/dist/tests/zipfs.test.js +11 -11
- package/dist/tests/zipfs.test.js.map +1 -1
- package/dist/workspaceFactory.d.ts +13 -14
- package/dist/workspaceFactory.js +54 -55
- package/dist/workspaceFactory.js.map +1 -1
- package/package.json +2 -2
- package/dist/common/uriParser.d.ts +0 -24
- package/dist/common/uriParser.js +0 -45
- package/dist/common/uriParser.js.map +0 -1
package/dist/analyzer/binder.js
CHANGED
@@ -47,6 +47,7 @@ const diagnosticRules_1 = require("../common/diagnosticRules");
|
|
47
47
|
const pathUtils_1 = require("../common/pathUtils");
|
48
48
|
const positionUtils_1 = require("../common/positionUtils");
|
49
49
|
const textRange_1 = require("../common/textRange");
|
50
|
+
const uri_1 = require("../common/uri/uri");
|
50
51
|
const localize_1 = require("../localization/localize");
|
51
52
|
const AnalyzerNodeInfo = __importStar(require("./analyzerNodeInfo"));
|
52
53
|
const codeFlowTypes_1 = require("./codeFlowTypes");
|
@@ -224,7 +225,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
224
225
|
const classDeclaration = {
|
225
226
|
type: 6 /* DeclarationType.Class */,
|
226
227
|
node,
|
227
|
-
|
228
|
+
uri: this._fileInfo.fileUri,
|
228
229
|
range: (0, positionUtils_1.convertTextRangeToRange)(node.name, this._fileInfo.lines),
|
229
230
|
moduleName: this._fileInfo.moduleName,
|
230
231
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -269,7 +270,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
269
270
|
node,
|
270
271
|
isMethod: !!containingClassNode,
|
271
272
|
isGenerator: false,
|
272
|
-
|
273
|
+
uri: this._fileInfo.fileUri,
|
273
274
|
range: (0, positionUtils_1.convertTextRangeToRange)(node.name, this._fileInfo.lines),
|
274
275
|
moduleName: this._fileInfo.moduleName,
|
275
276
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -329,7 +330,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
329
330
|
const paramDeclaration = {
|
330
331
|
type: 2 /* DeclarationType.Parameter */,
|
331
332
|
node: paramNode,
|
332
|
-
|
333
|
+
uri: this._fileInfo.fileUri,
|
333
334
|
range: (0, positionUtils_1.convertTextRangeToRange)(paramNode, this._fileInfo.lines),
|
334
335
|
moduleName: this._fileInfo.moduleName,
|
335
336
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -387,7 +388,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
387
388
|
const paramDeclaration = {
|
388
389
|
type: 2 /* DeclarationType.Parameter */,
|
389
390
|
node: paramNode,
|
390
|
-
|
391
|
+
uri: this._fileInfo.fileUri,
|
391
392
|
range: (0, positionUtils_1.convertTextRangeToRange)(paramNode, this._fileInfo.lines),
|
392
393
|
moduleName: this._fileInfo.moduleName,
|
393
394
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -511,7 +512,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
511
512
|
const paramDeclaration = {
|
512
513
|
type: 3 /* DeclarationType.TypeParameter */,
|
513
514
|
node: param,
|
514
|
-
|
515
|
+
uri: this._fileInfo.fileUri,
|
515
516
|
range: (0, positionUtils_1.convertTextRangeToRange)(node, this._fileInfo.lines),
|
516
517
|
moduleName: this._fileInfo.moduleName,
|
517
518
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -542,10 +543,11 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
542
543
|
const typeAliasDeclaration = {
|
543
544
|
type: 4 /* DeclarationType.TypeAlias */,
|
544
545
|
node,
|
545
|
-
|
546
|
+
uri: this._fileInfo.fileUri,
|
546
547
|
range: (0, positionUtils_1.convertTextRangeToRange)(node.name, this._fileInfo.lines),
|
547
548
|
moduleName: this._fileInfo.moduleName,
|
548
549
|
isInExceptSuite: this._isInExceptSuite,
|
550
|
+
docString: this._getVariableDocString(node.expression),
|
549
551
|
};
|
550
552
|
const symbol = this._bindNameToScope(this._currentScope, node.name);
|
551
553
|
if (symbol) {
|
@@ -1017,7 +1019,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1017
1019
|
node: node.name,
|
1018
1020
|
isConstant: (0, symbolNameUtils_1.isConstantName)(node.name.value),
|
1019
1021
|
inferredTypeSource: node,
|
1020
|
-
|
1022
|
+
uri: this._fileInfo.fileUri,
|
1021
1023
|
range: (0, positionUtils_1.convertTextRangeToRange)(node.name, this._fileInfo.lines),
|
1022
1024
|
moduleName: this._fileInfo.moduleName,
|
1023
1025
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -1037,6 +1039,9 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1037
1039
|
return false;
|
1038
1040
|
}
|
1039
1041
|
visitRaise(node) {
|
1042
|
+
if (this._currentFlowNode) {
|
1043
|
+
this._addExceptTargets(this._currentFlowNode);
|
1044
|
+
}
|
1040
1045
|
if (this._targetFunctionDeclaration) {
|
1041
1046
|
if (!this._targetFunctionDeclaration.raiseStatements) {
|
1042
1047
|
this._targetFunctionDeclaration.raiseStatements = [];
|
@@ -1298,9 +1303,9 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1298
1303
|
const dataclassesSymbolsOfInterest = ['InitVar'];
|
1299
1304
|
const importInfo = AnalyzerNodeInfo.getImportInfo(node.module);
|
1300
1305
|
AnalyzerNodeInfo.setFlowNode(node, this._currentFlowNode);
|
1301
|
-
let resolvedPath =
|
1306
|
+
let resolvedPath = uri_1.Uri.empty();
|
1302
1307
|
if (importInfo && importInfo.isImportFound && !importInfo.isNativeLib) {
|
1303
|
-
resolvedPath = importInfo.
|
1308
|
+
resolvedPath = importInfo.resolvedUris[importInfo.resolvedUris.length - 1];
|
1304
1309
|
}
|
1305
1310
|
// If this file is a module __init__.py(i), relative imports of submodules
|
1306
1311
|
// using the syntax "from .x import y" introduce a symbol x into the
|
@@ -1308,7 +1313,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1308
1313
|
// symbols below) in case one of the imported symbols is the same name as the
|
1309
1314
|
// submodule. In that case, we want to the symbol to appear later in the
|
1310
1315
|
// declaration list because it should "win" when resolving the alias.
|
1311
|
-
const fileName = (0, pathUtils_1.stripFileExtension)(
|
1316
|
+
const fileName = (0, pathUtils_1.stripFileExtension)(this._fileInfo.fileUri.fileName);
|
1312
1317
|
const isModuleInitFile = fileName === '__init__' && node.module.leadingDots === 1 && node.module.nameParts.length === 1;
|
1313
1318
|
let isTypingImport = false;
|
1314
1319
|
let isDataclassesImport = false;
|
@@ -1353,7 +1358,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1353
1358
|
const aliasDecl = {
|
1354
1359
|
type: 8 /* DeclarationType.Alias */,
|
1355
1360
|
node,
|
1356
|
-
|
1361
|
+
uri: resolvedPath,
|
1357
1362
|
loadSymbolsFromPath: true,
|
1358
1363
|
range: (0, textRange_1.getEmptyRange)(),
|
1359
1364
|
usesLocalName: false,
|
@@ -1373,7 +1378,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1373
1378
|
const submoduleFallback = {
|
1374
1379
|
type: 8 /* DeclarationType.Alias */,
|
1375
1380
|
node,
|
1376
|
-
|
1381
|
+
uri: implicitImport.uri,
|
1377
1382
|
loadSymbolsFromPath: true,
|
1378
1383
|
range: (0, textRange_1.getEmptyRange)(),
|
1379
1384
|
usesLocalName: false,
|
@@ -1383,7 +1388,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1383
1388
|
const aliasDecl = {
|
1384
1389
|
type: 8 /* DeclarationType.Alias */,
|
1385
1390
|
node,
|
1386
|
-
|
1391
|
+
uri: resolvedPath,
|
1387
1392
|
loadSymbolsFromPath: true,
|
1388
1393
|
usesLocalName: false,
|
1389
1394
|
symbolName: name,
|
@@ -1451,7 +1456,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1451
1456
|
submoduleFallback = {
|
1452
1457
|
type: 8 /* DeclarationType.Alias */,
|
1453
1458
|
node: importSymbolNode,
|
1454
|
-
|
1459
|
+
uri: implicitImport.uri,
|
1455
1460
|
loadSymbolsFromPath: true,
|
1456
1461
|
range: (0, textRange_1.getEmptyRange)(),
|
1457
1462
|
usesLocalName: false,
|
@@ -1467,7 +1472,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1467
1472
|
if (node.module.leadingDots === 1 && node.module.nameParts.length === 0) {
|
1468
1473
|
loadSymbolsFromPath = false;
|
1469
1474
|
}
|
1470
|
-
else if (resolvedPath
|
1475
|
+
else if (resolvedPath.equals(this._fileInfo.fileUri)) {
|
1471
1476
|
loadSymbolsFromPath = false;
|
1472
1477
|
}
|
1473
1478
|
}
|
@@ -1475,7 +1480,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1475
1480
|
const aliasDecl = {
|
1476
1481
|
type: 8 /* DeclarationType.Alias */,
|
1477
1482
|
node: importSymbolNode,
|
1478
|
-
|
1483
|
+
uri: resolvedPath,
|
1479
1484
|
loadSymbolsFromPath,
|
1480
1485
|
usesLocalName: !!importSymbolNode.alias,
|
1481
1486
|
symbolName: importedName,
|
@@ -1769,7 +1774,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1769
1774
|
node: node.target,
|
1770
1775
|
isConstant: (0, symbolNameUtils_1.isConstantName)(node.target.value),
|
1771
1776
|
inferredTypeSource: node,
|
1772
|
-
|
1777
|
+
uri: this._fileInfo.fileUri,
|
1773
1778
|
range: (0, positionUtils_1.convertTextRangeToRange)(node.target, this._fileInfo.lines),
|
1774
1779
|
moduleName: this._fileInfo.moduleName,
|
1775
1780
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -1838,7 +1843,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1838
1843
|
node: slotNameNode,
|
1839
1844
|
isConstant: (0, symbolNameUtils_1.isConstantName)(slotName),
|
1840
1845
|
isDefinedBySlots: true,
|
1841
|
-
|
1846
|
+
uri: this._fileInfo.fileUri,
|
1842
1847
|
range: (0, positionUtils_1.convertTextRangeToRange)(slotNameNode, this._fileInfo.lines),
|
1843
1848
|
moduleName: this._fileInfo.moduleName,
|
1844
1849
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -1880,7 +1885,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1880
1885
|
node: target,
|
1881
1886
|
isConstant: (0, symbolNameUtils_1.isConstantName)(target.value),
|
1882
1887
|
inferredTypeSource: target.parent,
|
1883
|
-
|
1888
|
+
uri: this._fileInfo.fileUri,
|
1884
1889
|
range: (0, positionUtils_1.convertTextRangeToRange)(target, this._fileInfo.lines),
|
1885
1890
|
moduleName: this._fileInfo.moduleName,
|
1886
1891
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -1904,20 +1909,22 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1904
1909
|
}
|
1905
1910
|
// There should be only one declaration for the variable.
|
1906
1911
|
const aliasDecl = varSymbol.getDeclarations().find((decl) => decl.type === 8 /* DeclarationType.Alias */);
|
1907
|
-
const
|
1908
|
-
? aliasDecl.
|
1909
|
-
: ((_a = aliasDecl === null || aliasDecl === void 0 ? void 0 : aliasDecl.submoduleFallback) === null || _a === void 0 ? void 0 : _a.
|
1910
|
-
|
1912
|
+
const resolvedUri = (aliasDecl === null || aliasDecl === void 0 ? void 0 : aliasDecl.uri) && !aliasDecl.uri.isEmpty() && aliasDecl.loadSymbolsFromPath
|
1913
|
+
? aliasDecl.uri
|
1914
|
+
: ((_a = aliasDecl === null || aliasDecl === void 0 ? void 0 : aliasDecl.submoduleFallback) === null || _a === void 0 ? void 0 : _a.uri) &&
|
1915
|
+
!aliasDecl.submoduleFallback.uri.isEmpty() &&
|
1916
|
+
aliasDecl.submoduleFallback.loadSymbolsFromPath
|
1917
|
+
? aliasDecl.submoduleFallback.uri
|
1911
1918
|
: undefined;
|
1912
|
-
if (!
|
1919
|
+
if (!resolvedUri) {
|
1913
1920
|
return undefined;
|
1914
1921
|
}
|
1915
|
-
let lookupInfo = this._fileInfo.importLookup(
|
1922
|
+
let lookupInfo = this._fileInfo.importLookup(resolvedUri);
|
1916
1923
|
if (lookupInfo === null || lookupInfo === void 0 ? void 0 : lookupInfo.dunderAllNames) {
|
1917
1924
|
return lookupInfo.dunderAllNames;
|
1918
1925
|
}
|
1919
|
-
if ((_b = aliasDecl === null || aliasDecl === void 0 ? void 0 : aliasDecl.submoduleFallback) === null || _b === void 0 ? void 0 : _b.
|
1920
|
-
lookupInfo = this._fileInfo.importLookup(aliasDecl.submoduleFallback.
|
1926
|
+
if (((_b = aliasDecl === null || aliasDecl === void 0 ? void 0 : aliasDecl.submoduleFallback) === null || _b === void 0 ? void 0 : _b.uri) && !aliasDecl.submoduleFallback.uri.isEmpty()) {
|
1927
|
+
lookupInfo = this._fileInfo.importLookup(aliasDecl.submoduleFallback.uri);
|
1921
1928
|
return lookupInfo === null || lookupInfo === void 0 ? void 0 : lookupInfo.dunderAllNames;
|
1922
1929
|
}
|
1923
1930
|
return undefined;
|
@@ -1945,14 +1952,14 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1945
1952
|
.getDeclarations()
|
1946
1953
|
.find((decl) => decl.type === 8 /* DeclarationType.Alias */ && decl.firstNamePart === firstNamePartValue);
|
1947
1954
|
let newDecl;
|
1948
|
-
let
|
1949
|
-
if (importInfo && importInfo.isImportFound && !importInfo.isNativeLib && importInfo.
|
1950
|
-
|
1955
|
+
let uriOfLastSubmodule;
|
1956
|
+
if (importInfo && importInfo.isImportFound && !importInfo.isNativeLib && importInfo.resolvedUris.length > 0) {
|
1957
|
+
uriOfLastSubmodule = importInfo.resolvedUris[importInfo.resolvedUris.length - 1];
|
1951
1958
|
}
|
1952
1959
|
else {
|
1953
|
-
|
1960
|
+
uriOfLastSubmodule = declaration_1.UnresolvedModuleMarker;
|
1954
1961
|
}
|
1955
|
-
const isResolved = importInfo && importInfo.isImportFound && !importInfo.isNativeLib && importInfo.
|
1962
|
+
const isResolved = importInfo && importInfo.isImportFound && !importInfo.isNativeLib && importInfo.resolvedUris.length > 0;
|
1956
1963
|
if (existingDecl) {
|
1957
1964
|
newDecl = existingDecl;
|
1958
1965
|
}
|
@@ -1960,7 +1967,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1960
1967
|
newDecl = {
|
1961
1968
|
type: 8 /* DeclarationType.Alias */,
|
1962
1969
|
node,
|
1963
|
-
|
1970
|
+
uri: uriOfLastSubmodule,
|
1964
1971
|
loadSymbolsFromPath: false,
|
1965
1972
|
range: (0, textRange_1.getEmptyRange)(),
|
1966
1973
|
usesLocalName: !!importAlias,
|
@@ -1976,7 +1983,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1976
1983
|
newDecl = {
|
1977
1984
|
type: 8 /* DeclarationType.Alias */,
|
1978
1985
|
node,
|
1979
|
-
|
1986
|
+
uri: uriOfLastSubmodule,
|
1980
1987
|
loadSymbolsFromPath: true,
|
1981
1988
|
range: (0, textRange_1.getEmptyRange)(),
|
1982
1989
|
usesLocalName: !!importAlias,
|
@@ -1989,15 +1996,15 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
1989
1996
|
// See if there is import info for this part of the path. This allows us
|
1990
1997
|
// to implicitly import all of the modules in a multi-part module name.
|
1991
1998
|
const implicitImportInfo = AnalyzerNodeInfo.getImportInfo(node.module.nameParts[0]);
|
1992
|
-
if (implicitImportInfo && implicitImportInfo.
|
1993
|
-
newDecl.
|
1999
|
+
if (implicitImportInfo && implicitImportInfo.resolvedUris.length) {
|
2000
|
+
newDecl.uri = implicitImportInfo.resolvedUris[0];
|
1994
2001
|
newDecl.loadSymbolsFromPath = true;
|
1995
2002
|
this._addImplicitImportsToLoaderActions(implicitImportInfo, newDecl);
|
1996
2003
|
}
|
1997
2004
|
// Add the implicit imports for this module if it's the last
|
1998
2005
|
// name part we're resolving.
|
1999
2006
|
if (importAlias || node.module.nameParts.length === 1) {
|
2000
|
-
newDecl.
|
2007
|
+
newDecl.uri = uriOfLastSubmodule;
|
2001
2008
|
newDecl.loadSymbolsFromPath = true;
|
2002
2009
|
newDecl.isUnresolved = false;
|
2003
2010
|
if (importInfo) {
|
@@ -2014,12 +2021,12 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
2014
2021
|
? curLoaderActions.implicitImports.get(namePartValue)
|
2015
2022
|
: undefined;
|
2016
2023
|
if (!loaderActions) {
|
2017
|
-
const loaderActionPath = importInfo && i < importInfo.
|
2018
|
-
? importInfo.
|
2024
|
+
const loaderActionPath = importInfo && i < importInfo.resolvedUris.length
|
2025
|
+
? importInfo.resolvedUris[i]
|
2019
2026
|
: declaration_1.UnresolvedModuleMarker;
|
2020
2027
|
// Allocate a new loader action.
|
2021
2028
|
loaderActions = {
|
2022
|
-
|
2029
|
+
uri: loaderActionPath,
|
2023
2030
|
loadSymbolsFromPath: false,
|
2024
2031
|
implicitImports: new Map(),
|
2025
2032
|
isUnresolved: !isResolved,
|
@@ -2032,8 +2039,8 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
2032
2039
|
if (i === node.module.nameParts.length - 1) {
|
2033
2040
|
// If this is the last name part we're resolving, add in the
|
2034
2041
|
// implicit imports as well.
|
2035
|
-
if (importInfo && i < importInfo.
|
2036
|
-
loaderActions.
|
2042
|
+
if (importInfo && i < importInfo.resolvedUris.length) {
|
2043
|
+
loaderActions.uri = importInfo.resolvedUris[i];
|
2037
2044
|
loaderActions.loadSymbolsFromPath = true;
|
2038
2045
|
this._addImplicitImportsToLoaderActions(importInfo, loaderActions);
|
2039
2046
|
}
|
@@ -2044,8 +2051,8 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
2044
2051
|
// import all of the modules in a multi-part module name (e.g. "import a.b.c"
|
2045
2052
|
// imports "a" and "a.b" and "a.b.c").
|
2046
2053
|
const implicitImportInfo = AnalyzerNodeInfo.getImportInfo(node.module.nameParts[i]);
|
2047
|
-
if (implicitImportInfo && implicitImportInfo.
|
2048
|
-
loaderActions.
|
2054
|
+
if (implicitImportInfo && implicitImportInfo.resolvedUris.length) {
|
2055
|
+
loaderActions.uri = implicitImportInfo.resolvedUris[i];
|
2049
2056
|
loaderActions.loadSymbolsFromPath = true;
|
2050
2057
|
this._addImplicitImportsToLoaderActions(implicitImportInfo, loaderActions);
|
2051
2058
|
}
|
@@ -2691,7 +2698,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
2691
2698
|
type: 0 /* DeclarationType.Intrinsic */,
|
2692
2699
|
node,
|
2693
2700
|
intrinsicType: type,
|
2694
|
-
|
2701
|
+
uri: this._fileInfo.fileUri,
|
2695
2702
|
range: (0, textRange_1.getEmptyRange)(),
|
2696
2703
|
moduleName: this._fileInfo.moduleName,
|
2697
2704
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -2747,7 +2754,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
2747
2754
|
inferredTypeSource: source,
|
2748
2755
|
isInferenceAllowedInPyTyped: this._isInferenceAllowedInPyTyped(name.value),
|
2749
2756
|
typeAliasName: isPossibleTypeAlias ? target : undefined,
|
2750
|
-
|
2757
|
+
uri: this._fileInfo.fileUri,
|
2751
2758
|
range: (0, positionUtils_1.convertTextRangeToRange)(name, this._fileInfo.lines),
|
2752
2759
|
moduleName: this._fileInfo.moduleName,
|
2753
2760
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -2790,7 +2797,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
2790
2797
|
isConstant: (0, symbolNameUtils_1.isConstantName)(name.value),
|
2791
2798
|
inferredTypeSource: source,
|
2792
2799
|
isDefinedByMemberAccess: true,
|
2793
|
-
|
2800
|
+
uri: this._fileInfo.fileUri,
|
2794
2801
|
range: (0, positionUtils_1.convertTextRangeToRange)(target.memberName, this._fileInfo.lines),
|
2795
2802
|
moduleName: this._fileInfo.moduleName,
|
2796
2803
|
isInExceptSuite: this._isInExceptSuite,
|
@@ -2869,7 +2876,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
2869
2876
|
isConstant: (0, symbolNameUtils_1.isConstantName)(name.value),
|
2870
2877
|
isFinal: finalInfo.isFinal,
|
2871
2878
|
typeAliasName: target,
|
2872
|
-
|
2879
|
+
uri: this._fileInfo.fileUri,
|
2873
2880
|
typeAnnotationNode,
|
2874
2881
|
range: (0, positionUtils_1.convertTextRangeToRange)(name, this._fileInfo.lines),
|
2875
2882
|
moduleName: this._fileInfo.moduleName,
|
@@ -2933,7 +2940,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
2933
2940
|
isConstant: (0, symbolNameUtils_1.isConstantName)(name.value),
|
2934
2941
|
isDefinedByMemberAccess: true,
|
2935
2942
|
isFinal: finalInfo.isFinal,
|
2936
|
-
|
2943
|
+
uri: this._fileInfo.fileUri,
|
2937
2944
|
typeAnnotationNode: finalInfo.isFinal && !finalInfo.finalTypeNode ? undefined : typeAnnotation,
|
2938
2945
|
range: (0, positionUtils_1.convertTextRangeToRange)(target.memberName, this._fileInfo.lines),
|
2939
2946
|
moduleName: this._fileInfo.moduleName,
|
@@ -3134,7 +3141,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
3134
3141
|
? loaderActions.implicitImports.get(implicitImport.name)
|
3135
3142
|
: undefined;
|
3136
3143
|
if (existingLoaderAction) {
|
3137
|
-
existingLoaderAction.
|
3144
|
+
existingLoaderAction.uri = implicitImport.uri;
|
3138
3145
|
existingLoaderAction.loadSymbolsFromPath = true;
|
3139
3146
|
}
|
3140
3147
|
else {
|
@@ -3142,7 +3149,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
3142
3149
|
loaderActions.implicitImports = new Map();
|
3143
3150
|
}
|
3144
3151
|
loaderActions.implicitImports.set(implicitImport.name, {
|
3145
|
-
|
3152
|
+
uri: implicitImport.uri,
|
3146
3153
|
loadSymbolsFromPath: true,
|
3147
3154
|
implicitImports: new Map(),
|
3148
3155
|
});
|
@@ -3201,7 +3208,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
3201
3208
|
symbol.addDeclaration({
|
3202
3209
|
type: 7 /* DeclarationType.SpecialBuiltInClass */,
|
3203
3210
|
node: annotationNode,
|
3204
|
-
|
3211
|
+
uri: this._fileInfo.fileUri,
|
3205
3212
|
range: (0, positionUtils_1.convertTextRangeToRange)(annotationNode, this._fileInfo.lines),
|
3206
3213
|
moduleName: this._fileInfo.moduleName,
|
3207
3214
|
isInExceptSuite: this._isInExceptSuite,
|