@zzzen/pyright-internal 1.2.0-dev.20251019 → 1.2.0-dev.20251102
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/binder.d.ts +0 -1
- package/dist/analyzer/binder.js +2 -18
- package/dist/analyzer/binder.js.map +1 -1
- package/dist/analyzer/declarationUtils.js +3 -0
- package/dist/analyzer/declarationUtils.js.map +1 -1
- package/dist/analyzer/decorators.js +8 -2
- package/dist/analyzer/decorators.js.map +1 -1
- package/dist/analyzer/importStatementUtils.d.ts +2 -0
- package/dist/analyzer/importStatementUtils.js +18 -0
- package/dist/analyzer/importStatementUtils.js.map +1 -1
- package/dist/analyzer/typeEvaluator.js +8 -7
- package/dist/analyzer/typeEvaluator.js.map +1 -1
- package/dist/common/serviceKeys.js +15 -15
- package/dist/common/serviceKeys.js.map +1 -1
- package/dist/common/serviceProvider.d.ts +5 -0
- package/dist/common/serviceProvider.js +11 -9
- package/dist/common/serviceProvider.js.map +1 -1
- package/dist/languageServerBase.d.ts +1 -0
- package/dist/languageServerBase.js +3 -0
- package/dist/languageServerBase.js.map +1 -1
- package/dist/localization/package.nls.cs.json +3 -1
- package/dist/localization/package.nls.de.json +3 -1
- package/dist/localization/package.nls.es.json +3 -1
- package/dist/localization/package.nls.fr.json +3 -1
- package/dist/localization/package.nls.it.json +3 -1
- package/dist/localization/package.nls.ja.json +3 -1
- package/dist/localization/package.nls.ko.json +3 -1
- package/dist/localization/package.nls.pl.json +3 -1
- package/dist/localization/package.nls.pt-br.json +3 -1
- package/dist/localization/package.nls.qps-ploc.json +3 -1
- package/dist/localization/package.nls.ru.json +3 -1
- package/dist/localization/package.nls.tr.json +3 -1
- package/dist/localization/package.nls.zh-cn.json +3 -1
- package/dist/localization/package.nls.zh-tw.json +3 -1
- package/package.json +21 -21
|
@@ -89,7 +89,6 @@ export declare class Binder extends ParseTreeWalker {
|
|
|
89
89
|
private _getDunderAllNamesFromImport;
|
|
90
90
|
private _addImplicitFromImport;
|
|
91
91
|
private _createAliasDeclarationForMultipartImportName;
|
|
92
|
-
private _getWildcardImportNames;
|
|
93
92
|
private _walkStatementsAndReportUnreachable;
|
|
94
93
|
private _createStartFlowNode;
|
|
95
94
|
private _createBranchLabel;
|
package/dist/analyzer/binder.js
CHANGED
|
@@ -41,7 +41,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
41
41
|
};
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
43
|
exports.DummyScopeGenerator = exports.ReturnFinder = exports.YieldFinder = exports.Binder = void 0;
|
|
44
|
-
const collectionUtils_1 = require("../common/collectionUtils");
|
|
45
44
|
const debug_1 = require("../common/debug");
|
|
46
45
|
const diagnosticRules_1 = require("../common/diagnosticRules");
|
|
47
46
|
const pathUtils_1 = require("../common/pathUtils");
|
|
@@ -52,6 +51,7 @@ const localize_1 = require("../localization/localize");
|
|
|
52
51
|
const AnalyzerNodeInfo = __importStar(require("./analyzerNodeInfo"));
|
|
53
52
|
const codeFlowTypes_1 = require("./codeFlowTypes");
|
|
54
53
|
const declaration_1 = require("./declaration");
|
|
54
|
+
const importStatementUtils_1 = require("./importStatementUtils");
|
|
55
55
|
const ParseTreeUtils = __importStar(require("./parseTreeUtils"));
|
|
56
56
|
const parseTreeWalker_1 = require("./parseTreeWalker");
|
|
57
57
|
const scope_1 = require("./scope");
|
|
@@ -1338,7 +1338,7 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
|
1338
1338
|
this._currentScopeCodeFlowExpressions?.add(codeFlowTypes_1.wildcardImportReferenceKey);
|
|
1339
1339
|
const lookupInfo = this._fileInfo.importLookup(resolvedPath);
|
|
1340
1340
|
if (lookupInfo) {
|
|
1341
|
-
const wildcardNames =
|
|
1341
|
+
const wildcardNames = (0, importStatementUtils_1.getWildcardImportNames)(lookupInfo);
|
|
1342
1342
|
if (isModuleInitFile) {
|
|
1343
1343
|
// If the symbol is going to be immediately replaced with a same-named
|
|
1344
1344
|
// imported symbol, skip this.
|
|
@@ -2114,22 +2114,6 @@ class Binder extends parseTreeWalker_1.ParseTreeWalker {
|
|
|
2114
2114
|
symbol.addDeclaration(newDecl);
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
|
-
_getWildcardImportNames(lookupInfo) {
|
|
2118
|
-
const namesToImport = [];
|
|
2119
|
-
// If a dunder all symbol is defined, it takes precedence.
|
|
2120
|
-
if (lookupInfo.dunderAllNames) {
|
|
2121
|
-
if (!lookupInfo.usesUnsupportedDunderAllForm) {
|
|
2122
|
-
return lookupInfo.dunderAllNames;
|
|
2123
|
-
}
|
|
2124
|
-
(0, collectionUtils_1.appendArray)(namesToImport, lookupInfo.dunderAllNames);
|
|
2125
|
-
}
|
|
2126
|
-
lookupInfo.symbolTable.forEach((symbol, name) => {
|
|
2127
|
-
if (!symbol.isExternallyHidden() && !name.startsWith('_')) {
|
|
2128
|
-
namesToImport.push(name);
|
|
2129
|
-
}
|
|
2130
|
-
});
|
|
2131
|
-
return namesToImport;
|
|
2132
|
-
}
|
|
2133
2117
|
_walkStatementsAndReportUnreachable(statements) {
|
|
2134
2118
|
let foundUnreachableStatement = false;
|
|
2135
2119
|
for (const statement of statements) {
|