coc-pyright 1.1.333 → 1.1.334

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/lib/index.js +512 -401
  3. package/package.json +29 -2
package/lib/index.js CHANGED
@@ -13130,6 +13130,112 @@ var require_crypto = __commonJS({
13130
13130
  }
13131
13131
  });
13132
13132
 
13133
+ // node_modules/@zzzen/pyright-internal/dist/common/memUtils.js
13134
+ var require_memUtils = __commonJS({
13135
+ "node_modules/@zzzen/pyright-internal/dist/common/memUtils.js"(exports) {
13136
+ "use strict";
13137
+ Object.defineProperty(exports, "__esModule", { value: true });
13138
+ exports.getHeapStatistics = void 0;
13139
+ function getHeapStatisticsFunc() {
13140
+ try {
13141
+ const getHeapStatistics = require("v8").getHeapStatistics;
13142
+ if (getHeapStatistics) {
13143
+ return getHeapStatistics;
13144
+ }
13145
+ } catch {
13146
+ }
13147
+ return () => ({
13148
+ total_heap_size: 0,
13149
+ total_heap_size_executable: 0,
13150
+ total_physical_size: 0,
13151
+ total_available_size: 0,
13152
+ used_heap_size: 0,
13153
+ heap_size_limit: 0,
13154
+ malloced_memory: 0,
13155
+ peak_malloced_memory: 0,
13156
+ does_zap_garbage: 0,
13157
+ number_of_native_contexts: 0,
13158
+ number_of_detached_contexts: 0
13159
+ });
13160
+ }
13161
+ exports.getHeapStatistics = getHeapStatisticsFunc();
13162
+ }
13163
+ });
13164
+
13165
+ // node_modules/@zzzen/pyright-internal/dist/analyzer/cacheManager.js
13166
+ var require_cacheManager = __commonJS({
13167
+ "node_modules/@zzzen/pyright-internal/dist/analyzer/cacheManager.js"(exports) {
13168
+ "use strict";
13169
+ Object.defineProperty(exports, "__esModule", { value: true });
13170
+ exports.CacheManager = void 0;
13171
+ var debug_1 = require_debug2();
13172
+ var memUtils_1 = require_memUtils();
13173
+ var CacheManager = class {
13174
+ constructor() {
13175
+ this._pausedCount = 0;
13176
+ this._cacheOwners = [];
13177
+ }
13178
+ registerCacheOwner(provider) {
13179
+ this._cacheOwners.push(provider);
13180
+ }
13181
+ unregisterCacheOwner(provider) {
13182
+ const index = this._cacheOwners.findIndex((p) => p === provider);
13183
+ if (index < 0) {
13184
+ (0, debug_1.fail)("Specified cache provider not found");
13185
+ } else {
13186
+ this._cacheOwners.splice(index, 1);
13187
+ }
13188
+ }
13189
+ pauseTracking() {
13190
+ const local = this;
13191
+ local._pausedCount++;
13192
+ return {
13193
+ dispose() {
13194
+ local._pausedCount--;
13195
+ }
13196
+ };
13197
+ }
13198
+ getCacheUsage() {
13199
+ if (this._pausedCount > 0) {
13200
+ return -1;
13201
+ }
13202
+ let totalUsage = 0;
13203
+ this._cacheOwners.forEach((p) => {
13204
+ totalUsage += p.getCacheUsage();
13205
+ });
13206
+ return totalUsage;
13207
+ }
13208
+ emptyCache(console2) {
13209
+ if (console2) {
13210
+ const heapStats = (0, memUtils_1.getHeapStatistics)();
13211
+ console2.info(`Emptying type cache to avoid heap overflow. Used ${this._convertToMB(heapStats.used_heap_size)} out of ${this._convertToMB(heapStats.heap_size_limit)}.`);
13212
+ }
13213
+ this._cacheOwners.forEach((p) => {
13214
+ p.emptyCache();
13215
+ });
13216
+ }
13217
+ // Returns a ratio of used bytes to total bytes.
13218
+ getUsedHeapRatio(console2) {
13219
+ const heapStats = (0, memUtils_1.getHeapStatistics)();
13220
+ if (console2) {
13221
+ console2.info(`Heap stats: total_heap_size=${this._convertToMB(heapStats.total_heap_size)}, used_heap_size=${this._convertToMB(heapStats.used_heap_size)}, total_physical_size=${this._convertToMB(heapStats.total_physical_size)}, total_available_size=${this._convertToMB(heapStats.total_available_size)}, heap_size_limit=${this._convertToMB(heapStats.heap_size_limit)}`);
13222
+ }
13223
+ return heapStats.used_heap_size / heapStats.heap_size_limit;
13224
+ }
13225
+ _convertToMB(bytes) {
13226
+ return `${Math.round(bytes / (1024 * 1024))}MB`;
13227
+ }
13228
+ };
13229
+ exports.CacheManager = CacheManager;
13230
+ (function(CacheManager2) {
13231
+ function is(obj) {
13232
+ return obj.registerCacheOwner !== void 0 && obj.unregisterCacheOwner !== void 0 && obj.pauseTracking !== void 0 && obj.getCacheUsage !== void 0 && obj.emptyCache !== void 0 && obj.getUsedHeapRatio !== void 0;
13233
+ }
13234
+ CacheManager2.is = is;
13235
+ })(CacheManager = exports.CacheManager || (exports.CacheManager = {}));
13236
+ }
13237
+ });
13238
+
13133
13239
  // node_modules/vscode-languageserver-textdocument/lib/esm/main.js
13134
13240
  var main_exports2 = {};
13135
13241
  __export(main_exports2, {
@@ -14083,106 +14189,6 @@ var require_analyzerNodeInfo = __commonJS({
14083
14189
  }
14084
14190
  });
14085
14191
 
14086
- // node_modules/@zzzen/pyright-internal/dist/common/memUtils.js
14087
- var require_memUtils = __commonJS({
14088
- "node_modules/@zzzen/pyright-internal/dist/common/memUtils.js"(exports) {
14089
- "use strict";
14090
- Object.defineProperty(exports, "__esModule", { value: true });
14091
- exports.getHeapStatistics = void 0;
14092
- function getHeapStatisticsFunc() {
14093
- try {
14094
- const getHeapStatistics = require("v8").getHeapStatistics;
14095
- if (getHeapStatistics) {
14096
- return getHeapStatistics;
14097
- }
14098
- } catch {
14099
- }
14100
- return () => ({
14101
- total_heap_size: 0,
14102
- total_heap_size_executable: 0,
14103
- total_physical_size: 0,
14104
- total_available_size: 0,
14105
- used_heap_size: 0,
14106
- heap_size_limit: 0,
14107
- malloced_memory: 0,
14108
- peak_malloced_memory: 0,
14109
- does_zap_garbage: 0,
14110
- number_of_native_contexts: 0,
14111
- number_of_detached_contexts: 0
14112
- });
14113
- }
14114
- exports.getHeapStatistics = getHeapStatisticsFunc();
14115
- }
14116
- });
14117
-
14118
- // node_modules/@zzzen/pyright-internal/dist/analyzer/cacheManager.js
14119
- var require_cacheManager = __commonJS({
14120
- "node_modules/@zzzen/pyright-internal/dist/analyzer/cacheManager.js"(exports) {
14121
- "use strict";
14122
- Object.defineProperty(exports, "__esModule", { value: true });
14123
- exports.CacheManager = void 0;
14124
- var debug_1 = require_debug2();
14125
- var memUtils_1 = require_memUtils();
14126
- var CacheManager = class {
14127
- constructor() {
14128
- this._pausedCount = 0;
14129
- this._cacheOwners = [];
14130
- }
14131
- registerCacheOwner(provider) {
14132
- this._cacheOwners.push(provider);
14133
- }
14134
- unregisterCacheOwner(provider) {
14135
- const index = this._cacheOwners.findIndex((p) => p === provider);
14136
- if (index < 0) {
14137
- (0, debug_1.fail)("Specified cache provider not found");
14138
- } else {
14139
- this._cacheOwners.splice(index, 1);
14140
- }
14141
- }
14142
- pauseTracking() {
14143
- const local = this;
14144
- local._pausedCount++;
14145
- return {
14146
- dispose() {
14147
- local._pausedCount--;
14148
- }
14149
- };
14150
- }
14151
- getCacheUsage() {
14152
- if (this._pausedCount > 0) {
14153
- return -1;
14154
- }
14155
- let totalUsage = 0;
14156
- this._cacheOwners.forEach((p) => {
14157
- totalUsage += p.getCacheUsage();
14158
- });
14159
- return totalUsage;
14160
- }
14161
- emptyCache(console2) {
14162
- if (console2) {
14163
- const heapStats = (0, memUtils_1.getHeapStatistics)();
14164
- console2.info(`Emptying type cache to avoid heap overflow. Used ${this._convertToMB(heapStats.used_heap_size)} out of ${this._convertToMB(heapStats.heap_size_limit)}.`);
14165
- }
14166
- this._cacheOwners.forEach((p) => {
14167
- p.emptyCache();
14168
- });
14169
- }
14170
- // Returns a ratio of used bytes to total bytes.
14171
- getUsedHeapRatio(console2) {
14172
- const heapStats = (0, memUtils_1.getHeapStatistics)();
14173
- if (console2) {
14174
- console2.info(`Heap stats: total_heap_size=${this._convertToMB(heapStats.total_heap_size)}, used_heap_size=${this._convertToMB(heapStats.used_heap_size)}, total_physical_size=${this._convertToMB(heapStats.total_physical_size)}, total_available_size=${this._convertToMB(heapStats.total_available_size)}, heap_size_limit=${this._convertToMB(heapStats.heap_size_limit)}`);
14175
- }
14176
- return heapStats.used_heap_size / heapStats.heap_size_limit;
14177
- }
14178
- _convertToMB(bytes) {
14179
- return `${Math.round(bytes / (1024 * 1024))}MB`;
14180
- }
14181
- };
14182
- exports.CacheManager = CacheManager;
14183
- }
14184
- });
14185
-
14186
14192
  // node_modules/@zzzen/pyright-internal/dist/analyzer/circularDependency.js
14187
14193
  var require_circularDependency = __commonJS({
14188
14194
  "node_modules/@zzzen/pyright-internal/dist/analyzer/circularDependency.js"(exports) {
@@ -16626,8 +16632,8 @@ var require_parseTreeUtils = __commonJS({
16626
16632
  return result;
16627
16633
  };
16628
16634
  Object.defineProperty(exports, "__esModule", { value: true });
16629
- exports.getCallNodeAndActiveParameterIndex = exports.getEnclosingParameter = exports.CallNodeWalker = exports.NameNodeWalker = exports.isAssignmentToDefaultsFollowingNamedTuple = exports.isDocString = exports.getDocString = exports.isWithinAssertExpression = exports.isWithinTryBlock = exports.isWithinLoop = exports.isWithinAnnotationComment = exports.isWithinTypeAnnotation = exports.isWithinDefaultParamInitializer = exports.isPartialMatchingExpression = exports.isMatchingExpression = exports.containsAwaitNode = exports.isSuiteEmpty = exports.isNodeContainedWithinNodeType = exports.getParentAnnotationNode = exports.getParentNodeOfType = exports.isNodeContainedWithin = exports.isRequiredAllowedForAssignmentTarget = exports.isClassVarAllowedForAssignmentTarget = exports.isFinalAllowedForAssignmentTarget = exports.getTypeAnnotationNode = exports.getExecutionScopeNode = exports.getTypeVarScopeNode = exports.getEvaluationScopeNode = exports.getEvaluationNodeForAssignmentExpression = exports.getEnclosingSuiteOrModule = exports.getEnclosingClassOrFunction = exports.getEnclosingLambda = exports.getEnclosingFunctionEvaluationScope = exports.getEnclosingFunction = exports.getEnclosingClassOrModule = exports.getEnclosingModule = exports.getEnclosingClass = exports.getEnclosingSuite = exports.getDecoratorForName = exports.getCallForName = exports.printOperator = exports.printExpression = exports.printArgument = exports.getTypeSourceId = exports.getClassFullName = exports.isCompliantWithNodeRangeRules = exports.findNodeByOffset = exports.findNodeByPosition = exports.getNodeDepth = exports.PrintExpressionFlags = void 0;
16630
- exports.getTypeVarScopesForNode = exports.getScopeIdForNode = exports.getVariableDocStringNode = exports.operatorSupportsChaining = exports.isValidLocationForFutureImport = exports.isUnannotatedFunction = exports.isBlankLine = exports.getFullStatementRange = exports.getStringValueRange = exports.getStringNodeValueRange = exports.isLastNameOfDottedName = exports.isFirstNameOfDottedName = exports.getFirstNameOfDottedName = exports.getDottedName = exports.getDecoratorName = exports.getDottedNameWithGivenNodeAsLastName = exports.getFirstAncestorOrSelf = exports.getFirstAncestorOrSelfOfKind = exports.isLastNameOfModuleName = exports.isFromImportAlias = exports.isFromImportName = exports.isFromImportModuleName = exports.isImportAlias = exports.isImportModuleName = exports.getTypeAnnotationForParameter = exports.isFunctionSuiteEmpty = exports.getFileInfoFromNode = exports.getModuleNode = exports.isWriteAccess = exports.printParseNodeType = exports.getTokenOverlapping = exports.getTokenAt = exports.getTokenAtIndex = exports.isWhitespace = exports.getTokenAtLeft = exports.getTokenIndexAtLeft = void 0;
16635
+ exports.getEnclosingParameter = exports.CallNodeWalker = exports.NameNodeWalker = exports.isAssignmentToDefaultsFollowingNamedTuple = exports.isDocString = exports.getDocString = exports.isWithinAssertExpression = exports.isWithinTryBlock = exports.isWithinLoop = exports.isWithinAnnotationComment = exports.isWithinTypeAnnotation = exports.isWithinDefaultParamInitializer = exports.isPartialMatchingExpression = exports.isMatchingExpression = exports.containsAwaitNode = exports.isSuiteEmpty = exports.isNodeContainedWithinNodeType = exports.getParentAnnotationNode = exports.getParentNodeOfType = exports.isNodeContainedWithin = exports.isRequiredAllowedForAssignmentTarget = exports.isClassVarAllowedForAssignmentTarget = exports.isFinalAllowedForAssignmentTarget = exports.getArgumentsByRuntimeOrder = exports.getTypeAnnotationNode = exports.getExecutionScopeNode = exports.getTypeVarScopeNode = exports.getEvaluationScopeNode = exports.getEvaluationNodeForAssignmentExpression = exports.getEnclosingSuiteOrModule = exports.getEnclosingClassOrFunction = exports.getEnclosingLambda = exports.getEnclosingFunctionEvaluationScope = exports.getEnclosingFunction = exports.getEnclosingClassOrModule = exports.getEnclosingModule = exports.getEnclosingClass = exports.getEnclosingSuite = exports.getDecoratorForName = exports.getCallForName = exports.printOperator = exports.printExpression = exports.printArgument = exports.getTypeSourceId = exports.getClassFullName = exports.isCompliantWithNodeRangeRules = exports.findNodeByOffset = exports.findNodeByPosition = exports.getNodeDepth = exports.PrintExpressionFlags = void 0;
16636
+ exports.getTypeVarScopesForNode = exports.getScopeIdForNode = exports.getVariableDocStringNode = exports.operatorSupportsChaining = exports.isValidLocationForFutureImport = exports.isUnannotatedFunction = exports.isBlankLine = exports.getFullStatementRange = exports.getStringValueRange = exports.getStringNodeValueRange = exports.isLastNameOfDottedName = exports.isFirstNameOfDottedName = exports.getFirstNameOfDottedName = exports.getDottedName = exports.getDecoratorName = exports.getDottedNameWithGivenNodeAsLastName = exports.getFirstAncestorOrSelf = exports.getFirstAncestorOrSelfOfKind = exports.isLastNameOfModuleName = exports.isFromImportAlias = exports.isFromImportName = exports.isFromImportModuleName = exports.isImportAlias = exports.isImportModuleName = exports.getTypeAnnotationForParameter = exports.isFunctionSuiteEmpty = exports.getFileInfoFromNode = exports.getModuleNode = exports.isWriteAccess = exports.printParseNodeType = exports.getTokenOverlapping = exports.getTokenAt = exports.getTokenAtIndex = exports.isWhitespace = exports.getTokenAtLeft = exports.getTokenIndexAtLeft = exports.getCallNodeAndActiveParameterIndex = void 0;
16631
16637
  var AnalyzerNodeInfo = __importStar(require_analyzerNodeInfo());
16632
16638
  var core_1 = require_core();
16633
16639
  var debug_1 = require_debug2();
@@ -17426,6 +17432,18 @@ var require_parseTreeUtils = __commonJS({
17426
17432
  return void 0;
17427
17433
  }
17428
17434
  exports.getTypeAnnotationNode = getTypeAnnotationNode;
17435
+ function getArgumentsByRuntimeOrder(node) {
17436
+ const positionalArgs = node.arguments.filter(
17437
+ (arg) => !arg.name && arg.argumentCategory !== 2
17438
+ /* UnpackedDictionary */
17439
+ );
17440
+ const keywordArgs = node.arguments.filter(
17441
+ (arg) => !!arg.name || arg.argumentCategory === 2
17442
+ /* UnpackedDictionary */
17443
+ );
17444
+ return positionalArgs.concat(keywordArgs);
17445
+ }
17446
+ exports.getArgumentsByRuntimeOrder = getArgumentsByRuntimeOrder;
17429
17447
  function isFinalAllowedForAssignmentTarget(targetNode) {
17430
17448
  if (targetNode.nodeType === 38) {
17431
17449
  return true;
@@ -18670,6 +18688,138 @@ var require_parseTreeUtils = __commonJS({
18670
18688
  }
18671
18689
  });
18672
18690
 
18691
+ // node_modules/@zzzen/pyright-internal/dist/analyzer/sourceFileInfo.js
18692
+ var require_sourceFileInfo = __commonJS({
18693
+ "node_modules/@zzzen/pyright-internal/dist/analyzer/sourceFileInfo.js"(exports) {
18694
+ "use strict";
18695
+ Object.defineProperty(exports, "__esModule", { value: true });
18696
+ exports.SourceFileInfo = void 0;
18697
+ var SourceFileInfo = class {
18698
+ constructor(sourceFile, isTypeshedFile, isThirdPartyImport, isThirdPartyPyTypedPresent, _editModeTracker, args = {}) {
18699
+ this.sourceFile = sourceFile;
18700
+ this.isTypeshedFile = isTypeshedFile;
18701
+ this.isThirdPartyImport = isThirdPartyImport;
18702
+ this.isThirdPartyPyTypedPresent = isThirdPartyPyTypedPresent;
18703
+ this._editModeTracker = _editModeTracker;
18704
+ this.isCreatedInEditMode = this._editModeTracker.isEditMode;
18705
+ this._writableData = this._createWriteableData(args);
18706
+ this._cachePreEditState();
18707
+ }
18708
+ get diagnosticsVersion() {
18709
+ return this._writableData.diagnosticsVersion;
18710
+ }
18711
+ get builtinsImport() {
18712
+ return this._writableData.builtinsImport;
18713
+ }
18714
+ // Information about the chained source file
18715
+ // Chained source file is not supposed to exist on file system but
18716
+ // must exist in the program's source file list. Module level
18717
+ // scope of the chained source file will be inserted before
18718
+ // current file's scope.
18719
+ get chainedSourceFile() {
18720
+ return this._writableData.chainedSourceFile;
18721
+ }
18722
+ get effectiveFutureImports() {
18723
+ return this._writableData.effectiveFutureImports;
18724
+ }
18725
+ // Information about why the file is included in the program
18726
+ // and its relation to other source files in the program.
18727
+ get isTracked() {
18728
+ return this._writableData.isTracked;
18729
+ }
18730
+ get isOpenByClient() {
18731
+ return this._writableData.isOpenByClient;
18732
+ }
18733
+ get imports() {
18734
+ return this._writableData.imports;
18735
+ }
18736
+ get importedBy() {
18737
+ return this._writableData.importedBy;
18738
+ }
18739
+ get shadows() {
18740
+ return this._writableData.shadows;
18741
+ }
18742
+ get shadowedBy() {
18743
+ return this._writableData.shadowedBy;
18744
+ }
18745
+ set diagnosticsVersion(value) {
18746
+ this._cachePreEditState();
18747
+ this._writableData.diagnosticsVersion = value;
18748
+ }
18749
+ set builtinsImport(value) {
18750
+ this._cachePreEditState();
18751
+ this._writableData.builtinsImport = value;
18752
+ }
18753
+ set chainedSourceFile(value) {
18754
+ this._cachePreEditState();
18755
+ this._writableData.chainedSourceFile = value;
18756
+ }
18757
+ set effectiveFutureImports(value) {
18758
+ this._cachePreEditState();
18759
+ this._writableData.effectiveFutureImports = value;
18760
+ }
18761
+ set isTracked(value) {
18762
+ this._cachePreEditState();
18763
+ this._writableData.isTracked = value;
18764
+ }
18765
+ set isOpenByClient(value) {
18766
+ this._cachePreEditState();
18767
+ this._writableData.isOpenByClient = value;
18768
+ }
18769
+ mutate(callback) {
18770
+ this._cachePreEditState();
18771
+ callback(this._writableData);
18772
+ }
18773
+ restore() {
18774
+ if (this._preEditData) {
18775
+ this._writableData = this._preEditData;
18776
+ this._preEditData = void 0;
18777
+ this.sourceFile.dropParseAndBindInfo();
18778
+ }
18779
+ return this.sourceFile.restore();
18780
+ }
18781
+ _cachePreEditState() {
18782
+ if (!this._editModeTracker.isEditMode || this._preEditData) {
18783
+ return;
18784
+ }
18785
+ this._preEditData = this._writableData;
18786
+ this._writableData = this._cloneWriteableData(this._writableData);
18787
+ this._editModeTracker.addMutatedFiles(this);
18788
+ }
18789
+ _createWriteableData(args) {
18790
+ var _a, _b;
18791
+ return {
18792
+ isTracked: (_a = args.isTracked) !== null && _a !== void 0 ? _a : false,
18793
+ isOpenByClient: (_b = args.isOpenByClient) !== null && _b !== void 0 ? _b : false,
18794
+ builtinsImport: args.builtinsImport,
18795
+ chainedSourceFile: args.chainedSourceFile,
18796
+ diagnosticsVersion: args.diagnosticsVersion,
18797
+ effectiveFutureImports: args.effectiveFutureImports,
18798
+ imports: [],
18799
+ importedBy: [],
18800
+ shadows: [],
18801
+ shadowedBy: []
18802
+ };
18803
+ }
18804
+ _cloneWriteableData(data) {
18805
+ return {
18806
+ isTracked: data.isTracked,
18807
+ isOpenByClient: data.isOpenByClient,
18808
+ builtinsImport: data.builtinsImport,
18809
+ chainedSourceFile: data.chainedSourceFile,
18810
+ diagnosticsVersion: data.diagnosticsVersion,
18811
+ effectiveFutureImports: data.effectiveFutureImports,
18812
+ imports: data.imports.slice(),
18813
+ importedBy: data.importedBy.slice(),
18814
+ shadows: data.shadows.slice(),
18815
+ shadowedBy: data.shadowedBy.slice()
18816
+ };
18817
+ }
18818
+ };
18819
+ exports.SourceFileInfo = SourceFileInfo;
18820
+ }
18821
+ });
18822
+
18673
18823
  // node_modules/@zzzen/pyright-internal/dist/analyzer/sourceFileInfoUtils.js
18674
18824
  var require_sourceFileInfoUtils = __commonJS({
18675
18825
  "node_modules/@zzzen/pyright-internal/dist/analyzer/sourceFileInfoUtils.js"(exports) {
@@ -19086,7 +19236,6 @@ var require_types = __commonJS({
19086
19236
  ClassTypeFlags2[ClassTypeFlags2["SynthesizedDataClassOrder"] = 64] = "SynthesizedDataClassOrder";
19087
19237
  ClassTypeFlags2[ClassTypeFlags2["TypedDictClass"] = 128] = "TypedDictClass";
19088
19238
  ClassTypeFlags2[ClassTypeFlags2["CanOmitDictValues"] = 256] = "CanOmitDictValues";
19089
- ClassTypeFlags2[ClassTypeFlags2["DictValuesReadOnly"] = 512] = "DictValuesReadOnly";
19090
19239
  ClassTypeFlags2[ClassTypeFlags2["SupportsAbstractMethods"] = 1024] = "SupportsAbstractMethods";
19091
19240
  ClassTypeFlags2[ClassTypeFlags2["PropertyClass"] = 2048] = "PropertyClass";
19092
19241
  ClassTypeFlags2[ClassTypeFlags2["Final"] = 4096] = "Final";
@@ -19396,10 +19545,6 @@ var require_types = __commonJS({
19396
19545
  return !!(classType.details.flags & 256);
19397
19546
  }
19398
19547
  ClassType2.isCanOmitDictValues = isCanOmitDictValues;
19399
- function isDictValuesReadOnly(classType) {
19400
- return !!(classType.details.flags & 512);
19401
- }
19402
- ClassType2.isDictValuesReadOnly = isDictValuesReadOnly;
19403
19548
  function isEnumClass(classType) {
19404
19549
  return !!(classType.details.flags & 1048576);
19405
19550
  }
@@ -20253,13 +20398,8 @@ var require_types = __commonJS({
20253
20398
  );
20254
20399
  }
20255
20400
  TypeVarType2.createInstance = createInstance;
20256
- function createInstantiable(name, isParamSpec2 = false) {
20257
- return create(
20258
- name,
20259
- isParamSpec2,
20260
- 1
20261
- /* Instantiable */
20262
- );
20401
+ function createInstantiable(name, isParamSpec2 = false, runtimeClass) {
20402
+ return create(name, isParamSpec2, 1, runtimeClass);
20263
20403
  }
20264
20404
  TypeVarType2.createInstantiable = createInstantiable;
20265
20405
  function cloneAsInstance(type) {
@@ -20379,7 +20519,7 @@ var require_types = __commonJS({
20379
20519
  return `${name}.${scopeId}`;
20380
20520
  }
20381
20521
  TypeVarType2.makeNameWithScope = makeNameWithScope;
20382
- function create(name, isParamSpec2, typeFlags) {
20522
+ function create(name, isParamSpec2, typeFlags, runtimeClass) {
20383
20523
  const newTypeVarType = {
20384
20524
  category: 10,
20385
20525
  details: {
@@ -20388,7 +20528,8 @@ var require_types = __commonJS({
20388
20528
  declaredVariance: 2,
20389
20529
  isParamSpec: isParamSpec2,
20390
20530
  isVariadic: false,
20391
- isSynthesized: false
20531
+ isSynthesized: false,
20532
+ runtimeClass
20392
20533
  },
20393
20534
  flags: typeFlags
20394
20535
  };
@@ -26439,6 +26580,7 @@ var require_package_nls_cs = __commonJS({
26439
26580
  memberSetClassVar: "\u010Clen \u201E{name}\u201C nelze p\u0159i\u0159adit prost\u0159ednictv\xEDm instance t\u0159\xEDdy, proto\u017Ee se jedn\xE1 o t\u0159\xEDdu ClassVar",
26440
26581
  memberTypeMismatch: "{name} je nekompatibiln\xED typ",
26441
26582
  memberUnknown: "\u010Clen {name} je nezn\xE1m\xFD",
26583
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
26442
26584
  missingDeleter: "Chyb\xED metoda odstran\u011Bn\xED vlastnosti",
26443
26585
  missingGetter: "Chyb\xED metoda getter vlastnosti",
26444
26586
  missingProtocolMember: "\u010Clen {name} je deklarov\xE1n ve t\u0159\xEDd\u011B protokolu {classType}",
@@ -27188,6 +27330,7 @@ var require_package_nls_de = __commonJS({
27188
27330
  memberSetClassVar: 'Der Member "{name}" kann nicht \xFCber eine Klasseninstanz zugewiesen werden, da es sich um eine ClassVar handelt.',
27189
27331
  memberTypeMismatch: '"{name}" ist ein inkompatibler Typ.',
27190
27332
  memberUnknown: 'Das Member "{name}" ist unbekannt.',
27333
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
27191
27334
  missingDeleter: "Die Eigenschaft-Deleter-Methode fehlt.",
27192
27335
  missingGetter: "Die Eigenschaft-Getter-Methode fehlt.",
27193
27336
  missingProtocolMember: 'Member "{name}" ist in Protokollklasse "{classType}" deklariert.',
@@ -28687,6 +28830,7 @@ var require_package_nls_es = __commonJS({
28687
28830
  memberSetClassVar: 'El miembro "{name}" no se puede asignar a trav\xE9s de una instancia de clase porque es un ClassVar.',
28688
28831
  memberTypeMismatch: '"{name}" es un tipo incompatible',
28689
28832
  memberUnknown: 'El miembro "{name}" es desconocido',
28833
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
28690
28834
  missingDeleter: "Falta el m\xE9todo de eliminaci\xF3n de propiedades",
28691
28835
  missingGetter: "Falta el m\xE9todo Getter de la propiedad",
28692
28836
  missingProtocolMember: 'El miembro "{name}" est\xE1 declarado en la clase de protocolo "{classType}"',
@@ -29436,6 +29580,7 @@ var require_package_nls_fr = __commonJS({
29436
29580
  memberSetClassVar: `Le membre "{name}" ne peut pas \xEAtre attribu\xE9 via une instance de classe car il s'agit d'une ClassVar`,
29437
29581
  memberTypeMismatch: "\xAB {name} \xBB est un type incompatible",
29438
29582
  memberUnknown: "Le membre \xAB\xA0{name}\xA0\xBB est inconnu",
29583
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
29439
29584
  missingDeleter: "La m\xE9thode de suppression de propri\xE9t\xE9s est manquante",
29440
29585
  missingGetter: "La m\xE9thode getter de propri\xE9t\xE9 est manquante",
29441
29586
  missingProtocolMember: "Le membre \xAB\xA0{name}\xA0\xBB est d\xE9clar\xE9 dans la classe de protocole \xAB\xA0{classType}\xA0\xBB",
@@ -30185,6 +30330,7 @@ var require_package_nls_it = __commonJS({
30185
30330
  memberSetClassVar: `Non \xE8 possibile assegnare il membro "{name}" tramite un'istanza di classe perch\xE9 \xE8 una ClassVar`,
30186
30331
  memberTypeMismatch: '"{name}" \xE8 un tipo non compatibile',
30187
30332
  memberUnknown: 'Il membro "{name}" \xE8 sconosciuto',
30333
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
30188
30334
  missingDeleter: "Manca il metodo di eliminazione delle propriet\xE0",
30189
30335
  missingGetter: "Metodo getter propriet\xE0 mancante",
30190
30336
  missingProtocolMember: 'Il "{name}" membro \xE8 dichiarato nella classe di protocollo "{classType}"',
@@ -30934,6 +31080,7 @@ var require_package_nls_ja = __commonJS({
30934
31080
  memberSetClassVar: '\u30E1\u30F3\u30D0\u30FC "{name}" \u306F ClassVar \u3067\u3042\u308B\u305F\u3081\u3001\u30AF\u30E9\u30B9 \u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u4ECB\u3057\u3066\u5272\u308A\u5F53\u3066\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093',
30935
31081
  memberTypeMismatch: '"{name}" \u306F\u4E92\u63DB\u6027\u306E\u306A\u3044\u578B\u3067\u3059',
30936
31082
  memberUnknown: '\u30E1\u30F3\u30D0\u30FC "{name}" \u304C\u4E0D\u660E\u3067\u3059',
31083
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
30937
31084
  missingDeleter: "\u30D7\u30ED\u30D1\u30C6\u30A3\u524A\u9664\u30E1\u30BD\u30C3\u30C9\u304C\u3042\u308A\u307E\u305B\u3093",
30938
31085
  missingGetter: "\u30D7\u30ED\u30D1\u30C6\u30A3 getter \u30E1\u30BD\u30C3\u30C9\u304C\u3042\u308A\u307E\u305B\u3093",
30939
31086
  missingProtocolMember: '\u30E1\u30F3\u30D0\u30FC "{name}" \u306F\u30D7\u30ED\u30C8\u30B3\u30EB \u30AF\u30E9\u30B9 "{classType}" \u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059',
@@ -31683,6 +31830,7 @@ var require_package_nls_ko = __commonJS({
31683
31830
  memberSetClassVar: "\u2018{name}\u2019 \uBA64\uBC84\uB294 ClassVar\uC774\uBBC0\uB85C \uD074\uB798\uC2A4 \uC778\uC2A4\uD134\uC2A4\uB97C \uD1B5\uD574 \uD560\uB2F9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
31684
31831
  memberTypeMismatch: '"{name}"\uC740(\uB294) \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uD615\uC2DD\uC785\uB2C8\uB2E4.',
31685
31832
  memberUnknown: '\uBA64\uBC84 "{name}"\uC744(\uB97C) \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.',
31833
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
31686
31834
  missingDeleter: "\uC18D\uC131 \uC0AD\uC81C\uC790 \uBA54\uC11C\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
31687
31835
  missingGetter: "\uC18D\uC131 getter \uBA54\uC11C\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
31688
31836
  missingProtocolMember: '"{name}" \uBA64\uBC84\uAC00 \uD504\uB85C\uD1A0\uCF5C \uD074\uB798\uC2A4 "{classType}"\uB85C \uC120\uC5B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4.',
@@ -32432,6 +32580,7 @@ var require_package_nls_pl = __commonJS({
32432
32580
  memberSetClassVar: "Nie mo\u017Cna przypisa\u0107 sk\u0142adowej \u201E{name}\u201D przez wyst\u0105pienie klasy, poniewa\u017C jest to element ClassVar",
32433
32581
  memberTypeMismatch: "Nazwa \u201E{name}\u201D jest niezgodnym typem",
32434
32582
  memberUnknown: "Sk\u0142adowa \u201E{name}\u201D jest nieznana",
32583
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
32435
32584
  missingDeleter: "Brak metody usuwania w\u0142a\u015Bciwo\u015Bci",
32436
32585
  missingGetter: "Brak metody pobieraj\u0105cej w\u0142a\u015Bciwo\u015Bci",
32437
32586
  missingProtocolMember: "Sk\u0142adowa \u201E{name}\u201D jest zadeklarowana w klasie protoko\u0142u \u201E{classType}\u201D",
@@ -33181,6 +33330,7 @@ var require_package_nls_pt_br = __commonJS({
33181
33330
  memberSetClassVar: 'O membro "{name}" n\xE3o pode ser atribu\xEDdo por meio de uma inst\xE2ncia de classe porque \xE9 um ClassVar',
33182
33331
  memberTypeMismatch: '"{name}" \xE9 um tipo incompat\xEDvel',
33183
33332
  memberUnknown: 'O membro "{name}" \xE9 desconhecido',
33333
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
33184
33334
  missingDeleter: "O m\xE9todo de exclus\xE3o de propriedade est\xE1 ausente",
33185
33335
  missingGetter: "O m\xE9todo getter da propriedade est\xE1 ausente",
33186
33336
  missingProtocolMember: 'O membro "{name}" est\xE1 declarado na classe de protocolo "{classType}"',
@@ -33930,6 +34080,7 @@ var require_package_nls_qps_ploc = __commonJS({
33930
34080
  memberSetClassVar: '[2pVfQ][\u0E19\u0E31\u0E49M\xEBm\xFE\xEBr "{\xF1\xE6m\xEB}" \xE7\xE6\xF1\xF1\xF8t \xFE\xEB \xE6ss\xEFg\xF1\xEB\xF0 thr\xF8\xB5gh \xE6 \xE7l\xE6ss \xEF\xF1st\xE6\xF1\xE7\xEB \xFE\xEB\xE7\xE6\xB5s\xEB \xEFt \xEFs \xE6 \xC7l\xE6ssV\xE6r\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0915\u094D\u0930\u094D\u0924\u093F\u0943\u307E\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0915\u094D\u0930\u094D\u0924\u093F\u0943\u307E\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0E19\u0E31\u0E49\u0922\u0942\u0901]',
33931
34081
  memberTypeMismatch: '[IHN4x][\u0E19\u0E31\u0E49"{\xF1\xE6m\xEB}" \xEFs \xE6\xF1 \xEF\xF1\xE7\xF8mp\xE6t\xEF\xFEl\xEB t\xFFp\xEB\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0915\u094D\u0930\u094D\u0924\u093F\u0943\u0E19\u0E31\u0E49\u0922\u0942\u0901]',
33932
34082
  memberUnknown: '[7kDIF][\u0E19\u0E31\u0E49M\xEBm\xFE\xEBr "{\xF1\xE6m\xEB}" \xEFs \xB5\xF1k\xF1\xF8w\xF1\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0915\u094D\u0930\u094D\u0E19\u0E31\u0E49\u0922\u0942\u0901]',
34083
+ metaclassConflict: '[fjWW1][\u0E19\u0E31\u0E49M\xEBt\xE6\xE7l\xE6ss "{m\xEBt\xE6\xE7l\xE6ss1}" \xE7\xF8\xF1fl\xEF\xE7ts w\xEFth "{m\xEBt\xE6\xE7l\xE6ss2}"\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0915\u094D\u0930\u094D\u0924\u093F\u0943\u307E\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0915\u094D\u0E19\u0E31\u0E49\u0922\u0942\u0901]',
33933
34084
  missingDeleter: "[5IVNI][\u0E19\u0E31\u0E49Pr\xF8p\xEBrt\xFF \xF0\xEBl\xEBt\xEBr m\xEBth\xF8\xF0 \xEFs m\xEFss\xEF\xF1g\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0915\u094D\u0930\u094D\u0924\u093F\u0943\u307E\u0E19\u0E31\u0E49\u0922\u0942\u0901]",
33934
34085
  missingGetter: "[Mzn4K][\u0E19\u0E31\u0E49Pr\xF8p\xEBrt\xFF g\xEBtt\xEBr m\xEBth\xF8\xF0 \xEFs m\xEFss\xEF\xF1g\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0915\u094D\u0930\u094D\u0924\u093F\u0943\u0E19\u0E31\u0E49\u0922\u0942\u0901]",
33935
34086
  missingProtocolMember: '[ZIqwL][\u0E19\u0E31\u0E49M\xEBm\xFE\xEBr "{\xF1\xE6m\xEB}" \xEFs \xF0\xEB\xE7l\xE6r\xEB\xF0 \xEF\xF1 pr\xF8t\xF8\xE7\xF8l \xE7l\xE6ss "{\xE7l\xE6ssT\xFFp\xEB}"\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0915\u094D\u0930\u094D\u0924\u093F\u0943\u307E\u1EA4\u011F\u502A\u0130\u0402\u04B0\u0915\u094D\u0930\u094D\u0E19\u0E31\u0E49\u0922\u0942\u0901]',
@@ -34679,6 +34830,7 @@ var require_package_nls_ru = __commonJS({
34679
34830
  memberSetClassVar: '\u042D\u043B\u0435\u043C\u0435\u043D\u0442 "{name}" \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D \u0447\u0435\u0440\u0435\u0437 \u044D\u043A\u0437\u0435\u043C\u043F\u043B\u044F\u0440 \u043A\u043B\u0430\u0441\u0441\u0430, \u0442\u0430\u043A \u043A\u0430\u043A \u044D\u0442\u043E ClassVar',
34680
34831
  memberTypeMismatch: '"{name}" \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043D\u0435\u0441\u043E\u0432\u043C\u0435\u0441\u0442\u0438\u043C\u044B\u043C \u0442\u0438\u043F\u043E\u043C',
34681
34832
  memberUnknown: '\u042D\u043B\u0435\u043C\u0435\u043D\u0442 "{name}" \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D',
34833
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
34682
34834
  missingDeleter: "\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043C\u0435\u0442\u043E\u0434 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430",
34683
34835
  missingGetter: "\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043C\u0435\u0442\u043E\u0434 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430",
34684
34836
  missingProtocolMember: '\u042D\u043B\u0435\u043C\u0435\u043D\u0442 "{name}" \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D \u0432 \u043A\u043B\u0430\u0441\u0441\u0435 \u043F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u0430 "{classType}"',
@@ -35428,6 +35580,7 @@ var require_package_nls_tr = __commonJS({
35428
35580
  memberSetClassVar: '"{name}" \xFCyesi bir ClassVar oldu\u011Fundan s\u0131n\u0131f \xF6rne\u011Fi arac\u0131l\u0131\u011F\u0131yla atanamaz',
35429
35581
  memberTypeMismatch: '"{name}" uyumsuz bir t\xFCr',
35430
35582
  memberUnknown: '"{name}" \xFCyesi bilinmiyor',
35583
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
35431
35584
  missingDeleter: "\xD6zellik silici metodu eksik",
35432
35585
  missingGetter: "\xD6zellik al\u0131c\u0131 metodu eksik",
35433
35586
  missingProtocolMember: '"{name}" \xFCyesi "{classType}" protokol s\u0131n\u0131f\u0131nda bildirildi',
@@ -36177,6 +36330,7 @@ var require_package_nls_zh_cn = __commonJS({
36177
36330
  memberSetClassVar: "\u65E0\u6CD5\u901A\u8FC7\u7C7B\u5B9E\u4F8B\u5206\u914D\u6210\u5458\u201C{name}\u201D\uFF0C\u56E0\u4E3A\u5B83\u662F ClassVar",
36178
36331
  memberTypeMismatch: '"{name}"\u662F\u4E0D\u517C\u5BB9\u7684\u7C7B\u578B',
36179
36332
  memberUnknown: '\u6210\u5458"{name}"\u672A\u77E5',
36333
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
36180
36334
  missingDeleter: "\u7F3A\u5C11\u5C5E\u6027 deleter\u65B9\u6CD5",
36181
36335
  missingGetter: "\u7F3A\u5C11\u5C5E\u6027 getter \u65B9\u6CD5",
36182
36336
  missingProtocolMember: '\u6210\u5458"{name}"\u5DF2\u5728\u534F\u8BAE\u7C7B"{classType}"\u4E2D\u58F0\u660E',
@@ -36926,6 +37080,7 @@ var require_package_nls_zh_tw = __commonJS({
36926
37080
  memberSetClassVar: '\u7121\u6CD5\u900F\u904E\u985E\u5225\u57F7\u884C\u500B\u9AD4\u6307\u6D3E\u6210\u54E1 "{name}"\uFF0C\u56E0\u70BA\u5B83\u662F ClassVar',
36927
37081
  memberTypeMismatch: '"{name}" \u662F\u4E0D\u76F8\u5BB9\u7684\u985E\u578B',
36928
37082
  memberUnknown: '\u6210\u54E1 "{name}" \u672A\u77E5',
37083
+ metaclassConflict: 'Metaclass "{metaclass1}" conflicts with "{metaclass2}"',
36929
37084
  missingDeleter: "\u5C6C\u6027 deleter \u65B9\u6CD5\u907A\u5931",
36930
37085
  missingGetter: "\u5C6C\u6027 getter \u65B9\u6CD5\u907A\u5931",
36931
37086
  missingProtocolMember: '\u6210\u54E1 "{name}" \u5DF2\u5728\u901A\u8A0A\u5354\u5B9A\u985E\u5225 "{classType}" \u4E2D\u5BA3\u544A',
@@ -37123,6 +37278,7 @@ var require_localize = __commonJS({
37123
37278
  }
37124
37279
  var localeOverride;
37125
37280
  function setLocaleOverride(locale) {
37281
+ localizedStrings = void 0;
37126
37282
  localeOverride = locale.toLowerCase();
37127
37283
  }
37128
37284
  exports.setLocaleOverride = setLocaleOverride;
@@ -38354,6 +38510,7 @@ var require_typeEvaluatorTypes = __commonJS({
38354
38510
  EvaluatorFlags2[EvaluatorFlags2["InterpreterParsesStringLiteral"] = 4194304] = "InterpreterParsesStringLiteral";
38355
38511
  EvaluatorFlags2[EvaluatorFlags2["AllowUnpackedTypedDict"] = 8388608] = "AllowUnpackedTypedDict";
38356
38512
  EvaluatorFlags2[EvaluatorFlags2["DisallowPep695TypeAlias"] = 16777216] = "DisallowPep695TypeAlias";
38513
+ EvaluatorFlags2[EvaluatorFlags2["SkipConvertParamSpecToRuntimeObject"] = 33554432] = "SkipConvertParamSpecToRuntimeObject";
38357
38514
  EvaluatorFlags2[EvaluatorFlags2["CallBaseDefaults"] = 16777218] = "CallBaseDefaults";
38358
38515
  EvaluatorFlags2[EvaluatorFlags2["IndexBaseDefaults"] = 2] = "IndexBaseDefaults";
38359
38516
  EvaluatorFlags2[EvaluatorFlags2["MemberAccessBaseDefaults"] = 16777218] = "MemberAccessBaseDefaults";
@@ -39210,17 +39367,20 @@ var require_constraintSolver = __commonJS({
39210
39367
  function logTypeVarSignatureContext(evaluator, context, indent) {
39211
39368
  let loggedConstraint = false;
39212
39369
  context.getTypeVars().forEach((entry) => {
39370
+ var _a;
39213
39371
  const typeVarName = `${indent}${entry.typeVar.details.name}`;
39214
- if (entry.narrowBound && entry.wideBound && (0, types_1.isTypeSame)(entry.narrowBound, entry.wideBound)) {
39215
- console.log(`${typeVarName} = ${evaluator.printType(entry.narrowBound)}`);
39372
+ const narrowBound = (_a = entry.narrowBoundNoLiterals) !== null && _a !== void 0 ? _a : entry.narrowBound;
39373
+ const wideBound = entry.wideBound;
39374
+ if (narrowBound && wideBound && (0, types_1.isTypeSame)(narrowBound, wideBound)) {
39375
+ console.log(`${typeVarName} = ${evaluator.printType(narrowBound)}`);
39216
39376
  loggedConstraint = true;
39217
39377
  } else {
39218
- if (entry.narrowBound) {
39219
- console.log(`${typeVarName} \u2264 ${evaluator.printType(entry.narrowBound)}`);
39378
+ if (narrowBound) {
39379
+ console.log(`${typeVarName} \u2264 ${evaluator.printType(narrowBound)}`);
39220
39380
  loggedConstraint = true;
39221
39381
  }
39222
- if (entry.wideBound) {
39223
- console.log(`${typeVarName} \u2265 ${evaluator.printType(entry.wideBound)}`);
39382
+ if (wideBound) {
39383
+ console.log(`${typeVarName} \u2265 ${evaluator.printType(wideBound)}`);
39224
39384
  loggedConstraint = true;
39225
39385
  }
39226
39386
  }
@@ -39281,7 +39441,7 @@ var require_typedDicts = __commonJS({
39281
39441
  var typeUtils_1 = require_typeUtils();
39282
39442
  var typeVarContext_1 = require_typeVarContext();
39283
39443
  function createTypedDictType(evaluator, errorNode, typedDictClass, argList) {
39284
- var _a, _b;
39444
+ var _a;
39285
39445
  const fileInfo = AnalyzerNodeInfo.getFileInfo(errorNode);
39286
39446
  let className = "TypedDict";
39287
39447
  if (argList.length === 0) {
@@ -39359,13 +39519,11 @@ var require_typedDicts = __commonJS({
39359
39519
  }
39360
39520
  if (usingDictSyntax) {
39361
39521
  for (const arg of argList.slice(2)) {
39362
- if (((_a = arg.name) === null || _a === void 0 ? void 0 : _a.value) === "total" || ((_b = arg.name) === null || _b === void 0 ? void 0 : _b.value) === "readonly") {
39522
+ if (((_a = arg.name) === null || _a === void 0 ? void 0 : _a.value) === "total") {
39363
39523
  if (!arg.valueExpression || arg.valueExpression.nodeType !== 11 || !(arg.valueExpression.constType === 15 || arg.valueExpression.constType === 33)) {
39364
39524
  evaluator.addError(localize_1.Localizer.Diagnostic.typedDictBoolParam().format({ name: arg.name.value }), arg.valueExpression || errorNode);
39365
39525
  } else if (arg.name.value === "total" && arg.valueExpression.constType === 15) {
39366
39526
  classType.details.flags |= 256;
39367
- } else if (arg.name.value === "readonly" && arg.valueExpression.constType === 33) {
39368
- classType.details.flags |= 512;
39369
39527
  }
39370
39528
  } else {
39371
39529
  evaluator.addError(localize_1.Localizer.Diagnostic.typedDictExtraArgs(), arg.valueExpression || errorNode);
@@ -39720,7 +39878,7 @@ var require_typedDicts = __commonJS({
39720
39878
  name: "",
39721
39879
  type: types_1.AnyType.create()
39722
39880
  });
39723
- return types_1.OverloadedFunctionType.create([updateMethod1, updateMethod2, updateMethod3]);
39881
+ return types_1.OverloadedFunctionType.create([updateMethod2, updateMethod1, updateMethod3]);
39724
39882
  };
39725
39883
  const selfParam = {
39726
39884
  category: 0,
@@ -39922,7 +40080,7 @@ var require_typedDicts = __commonJS({
39922
40080
  let valueType = evaluator.getEffectiveTypeOfSymbol(symbol);
39923
40081
  valueType = (0, typeUtils_1.applySolvedTypeVars)(valueType, typeVarContext);
39924
40082
  let isRequired = !types_1.ClassType.isCanOmitDictValues(classType);
39925
- let isReadOnly = types_1.ClassType.isDictValuesReadOnly(classType);
40083
+ let isReadOnly = false;
39926
40084
  if (isRequiredTypedDictVariable(evaluator, symbol)) {
39927
40085
  isRequired = true;
39928
40086
  } else if (isNotRequiredTypedDictVariable(evaluator, symbol)) {
@@ -43347,7 +43505,7 @@ var require_codeFlowEngine = __commonJS({
43347
43505
  }
43348
43506
  if (curFlowNode.flags & codeFlowTypes_1.FlowFlags.Call) {
43349
43507
  const callFlowNode = curFlowNode;
43350
- if (!(options === null || options === void 0 ? void 0 : options.skipNoReturnCallAnalysis) && isCallNoReturn(evaluator, callFlowNode)) {
43508
+ if (isCallNoReturn(evaluator, callFlowNode)) {
43351
43509
  return setCacheEntry(
43352
43510
  curFlowNode,
43353
43511
  /* type */
@@ -54815,6 +54973,7 @@ var require_protocols = __commonJS({
54815
54973
  return;
54816
54974
  }
54817
54975
  let srcMemberType;
54976
+ let isSrcReadOnly = false;
54818
54977
  if ((0, types_1.isClass)(srcType)) {
54819
54978
  if (treatSourceAsInstantiable && srcType.details.effectiveMetaclass && (0, types_1.isInstantiableClass)(srcType.details.effectiveMetaclass)) {
54820
54979
  srcMemberInfo = (0, typeUtils_1.lookUpClassMember)(srcType.details.effectiveMetaclass, name);
@@ -54867,6 +55026,9 @@ var require_protocols = __commonJS({
54867
55026
  }
54868
55027
  }
54869
55028
  }
55029
+ if (types_1.ClassType.isFrozenDataClass(srcType) || types_1.ClassType.isReadOnlyInstanceVariables(srcType)) {
55030
+ isSrcReadOnly = true;
55031
+ }
54870
55032
  } else {
54871
55033
  srcSymbol = srcType.fields.get(name);
54872
55034
  if (!srcSymbol) {
@@ -54943,6 +55105,19 @@ var require_protocols = __commonJS({
54943
55105
  }
54944
55106
  typesAreConsistent = false;
54945
55107
  }
55108
+ if (isSrcReadOnly) {
55109
+ if ((0, typeUtils_1.lookUpClassMember)(
55110
+ destMemberType,
55111
+ "__set__",
55112
+ 8
55113
+ /* SkipInstanceVariables */
55114
+ )) {
55115
+ if (subDiag) {
55116
+ subDiag.addMessage(localize_1.Localizer.DiagnosticAddendum.memberIsWritableInProtocol().format({ name }));
55117
+ }
55118
+ typesAreConsistent = false;
55119
+ }
55120
+ }
54946
55121
  }
54947
55122
  } else {
54948
55123
  const primaryDecl = destSymbol.getDeclarations()[0];
@@ -54987,9 +55162,14 @@ var require_protocols = __commonJS({
54987
55162
  const destPrimaryDecl = (0, symbolUtils_1.getLastTypedDeclaredForSymbol)(destSymbol);
54988
55163
  const srcPrimaryDecl = (0, symbolUtils_1.getLastTypedDeclaredForSymbol)(srcSymbol);
54989
55164
  if ((destPrimaryDecl === null || destPrimaryDecl === void 0 ? void 0 : destPrimaryDecl.type) === 1 && (srcPrimaryDecl === null || srcPrimaryDecl === void 0 ? void 0 : srcPrimaryDecl.type) === 1) {
54990
- const isDestConst = !!destPrimaryDecl.isConstant;
54991
- const isSrcConst = srcMemberInfo && (0, types_1.isClass)(srcMemberInfo.classType) && types_1.ClassType.isReadOnlyInstanceVariables(srcMemberInfo.classType) || !!srcPrimaryDecl.isConstant;
54992
- if (!isDestConst && isSrcConst) {
55165
+ const isDestReadOnly = !!destPrimaryDecl.isConstant;
55166
+ let isSrcReadOnly2 = !!srcPrimaryDecl.isConstant;
55167
+ if (srcMemberInfo && (0, types_1.isClass)(srcMemberInfo.classType)) {
55168
+ if (types_1.ClassType.isReadOnlyInstanceVariables(srcMemberInfo.classType) || types_1.ClassType.isFrozenDataClass(srcMemberInfo.classType)) {
55169
+ isSrcReadOnly2 = true;
55170
+ }
55171
+ }
55172
+ if (!isDestReadOnly && isSrcReadOnly2) {
54993
55173
  if (subDiag) {
54994
55174
  subDiag.addMessage(localize_1.Localizer.DiagnosticAddendum.memberIsWritableInProtocol().format({ name }));
54995
55175
  }
@@ -57899,10 +58079,7 @@ var require_typeEvaluator = __commonJS({
57899
58079
  /* targetSymbolId */
57900
58080
  void 0,
57901
58081
  /* typeAtStart */
57902
- types_1.UnboundType.create(),
57903
- {
57904
- skipNoReturnCallAnalysis: true
57905
- }
58082
+ types_1.UnboundType.create()
57906
58083
  );
57907
58084
  return codeFlowResult.type !== void 0 && !(0, types_1.isNever)(codeFlowResult.type);
57908
58085
  }
@@ -58897,7 +59074,6 @@ var require_typeEvaluator = __commonJS({
58897
59074
  return void 0;
58898
59075
  }
58899
59076
  function getTypeOfName(node, flags) {
58900
- var _a;
58901
59077
  const fileInfo = AnalyzerNodeInfo.getFileInfo(node);
58902
59078
  const name = node.value;
58903
59079
  let symbol;
@@ -59024,17 +59200,7 @@ var require_typeEvaluator = __commonJS({
59024
59200
  type = types_1.UnknownType.create();
59025
59201
  }
59026
59202
  }
59027
- if ((0, types_1.isTypeVar)(type) && !type.details.isParamSpec && !type.isVariadicInUnion && (flags & 128) === 0 && type.details.name === name) {
59028
- const isPep604Union = ((_a = node.parent) === null || _a === void 0 ? void 0 : _a.nodeType) === 7 && node.parent.operator === 6;
59029
- if (!isPep604Union) {
59030
- const typeVarType = type.details.isVariadic ? getTypingType(node, "TypeVarTuple") : getTypingType(node, "TypeVar");
59031
- if (typeVarType && (0, types_1.isInstantiableClass)(typeVarType)) {
59032
- type = types_1.ClassType.cloneAsInstance(typeVarType);
59033
- } else {
59034
- type = types_1.UnknownType.create();
59035
- }
59036
- }
59037
- }
59203
+ type = convertTypeVarToRuntimeInstance(node, type, flags);
59038
59204
  if ((flags & 256) === 0) {
59039
59205
  reportUseOfTypeCheckOnly(type, node);
59040
59206
  }
@@ -59055,6 +59221,23 @@ var require_typeEvaluator = __commonJS({
59055
59221
  }
59056
59222
  return { type, isIncomplete };
59057
59223
  }
59224
+ function convertTypeVarToRuntimeInstance(node, type, flags) {
59225
+ var _a;
59226
+ if (node.nodeType === 38 && (0, types_1.isTypeVar)(type) && node.value === type.details.name && !type.isVariadicInUnion && (flags & 128) === 0) {
59227
+ if ((flags & 33554432) !== 0 && type.details.isParamSpec) {
59228
+ return type;
59229
+ }
59230
+ const isPep604Union = ((_a = node.parent) === null || _a === void 0 ? void 0 : _a.nodeType) === 7 && node.parent.operator === 6;
59231
+ if (!isPep604Union) {
59232
+ if (type.details.runtimeClass) {
59233
+ type = types_1.ClassType.cloneAsInstance(type.details.runtimeClass);
59234
+ } else {
59235
+ type = types_1.UnknownType.create();
59236
+ }
59237
+ }
59238
+ }
59239
+ return type;
59240
+ }
59058
59241
  function getCodeFlowTypeForCapturedVariable(node, symbolWithScope, effectiveType) {
59059
59242
  const decls = symbolWithScope.symbol.getDeclarations();
59060
59243
  if (!decls.every(
@@ -59325,8 +59508,15 @@ var require_typeEvaluator = __commonJS({
59325
59508
  return { type, isRescoped: false, foundInterveningClass: false };
59326
59509
  }
59327
59510
  function getTypeOfMemberAccess(node, flags) {
59328
- const baseTypeFlags = 16777218 | flags & (256 | 32768 | 4 | 524288 | 2048 | 8192);
59329
- const baseTypeResult = getTypeOfExpression(node.leftExpression, baseTypeFlags);
59511
+ let leftExprFlags = 16777218;
59512
+ leftExprFlags |= flags & (256 | 32768 | 4 | 524288 | 2048 | 8192);
59513
+ if ((flags & 128) !== 0) {
59514
+ const memberName = node.memberName.value;
59515
+ if (memberName === "args" || memberName === "kwargs") {
59516
+ leftExprFlags |= 33554432;
59517
+ }
59518
+ }
59519
+ const baseTypeResult = getTypeOfExpression(node.leftExpression, leftExprFlags);
59330
59520
  if ((0, typeUtils_1.isTypeAliasPlaceholder)(baseTypeResult.type)) {
59331
59521
  return {
59332
59522
  type: types_1.UnknownType.create(
@@ -61354,7 +61544,7 @@ var require_typeEvaluator = __commonJS({
61354
61544
  } else {
61355
61545
  baseTypeResult = getTypeOfExpression(node.leftExpression, 16777218 | flags & 4);
61356
61546
  }
61357
- const argList = node.arguments.map((arg) => {
61547
+ const argList = ParseTreeUtils.getArgumentsByRuntimeOrder(node).map((arg) => {
61358
61548
  const functionArg = {
61359
61549
  valueExpression: arg.valueExpression,
61360
61550
  argumentCategory: arg.argumentCategory,
@@ -63779,7 +63969,8 @@ var require_typeEvaluator = __commonJS({
63779
63969
  const typeVar = types_1.TypeVarType.createInstantiable(
63780
63970
  typeVarName,
63781
63971
  /* isParamSpec */
63782
- false
63972
+ false,
63973
+ classType
63783
63974
  );
63784
63975
  const paramNameMap = /* @__PURE__ */ new Map();
63785
63976
  for (let i = 1; i < argList.length; i++) {
@@ -63888,7 +64079,8 @@ var require_typeEvaluator = __commonJS({
63888
64079
  const typeVar = types_1.TypeVarType.createInstantiable(
63889
64080
  typeVarName,
63890
64081
  /* isParamSpec */
63891
- false
64082
+ false,
64083
+ classType
63892
64084
  );
63893
64085
  typeVar.details.isVariadic = true;
63894
64086
  for (let i = 1; i < argList.length; i++) {
@@ -63939,7 +64131,8 @@ var require_typeEvaluator = __commonJS({
63939
64131
  const paramSpec = types_1.TypeVarType.createInstantiable(
63940
64132
  paramSpecName,
63941
64133
  /* isParamSpec */
63942
- true
64134
+ true,
64135
+ classType
63943
64136
  );
63944
64137
  for (let i = 1; i < argList.length; i++) {
63945
64138
  const paramNameNode = argList[i].name;
@@ -65011,21 +65204,6 @@ var require_typeEvaluator = __commonJS({
65011
65204
  return { type: returnedType };
65012
65205
  }
65013
65206
  function getTypeOfLambda(node, inferenceContext) {
65014
- let isIncomplete = !!(inferenceContext === null || inferenceContext === void 0 ? void 0 : inferenceContext.isTypeIncomplete);
65015
- const functionType = types_1.FunctionType.createInstance(
65016
- "",
65017
- "",
65018
- "",
65019
- 131072
65020
- /* PartiallyEvaluated */
65021
- );
65022
- functionType.details.typeVarScopeId = ParseTreeUtils.getScopeIdForNode(node);
65023
- writeTypeCache(
65024
- node,
65025
- { type: functionType, isIncomplete: true },
65026
- 0
65027
- /* None */
65028
- );
65029
65207
  let expectedFunctionTypes = [];
65030
65208
  if (inferenceContext) {
65031
65209
  (0, typeUtils_1.mapSubtypes)(inferenceContext.expectedType, (subtype) => {
@@ -65040,21 +65218,61 @@ var require_typeEvaluator = __commonJS({
65040
65218
  }
65041
65219
  return void 0;
65042
65220
  });
65043
- const minLambdaParamCount = node.parameters.filter((param) => param.category === 0 && !!param.name && param.defaultValue === void 0).length;
65044
- const maxLambdaParamCount = node.parameters.filter((param) => param.category === 0 && !!param.name).length;
65045
- expectedFunctionTypes = expectedFunctionTypes.filter((functionType2) => {
65046
- const functionParamCount = functionType2.details.parameters.filter((param) => !!param.name && !param.hasDefault).length;
65047
- const hasVarArgs = functionType2.details.parameters.some(
65048
- (param) => !!param.name && param.category !== 0
65049
- /* Simple */
65221
+ }
65222
+ if (expectedFunctionTypes.length <= 1) {
65223
+ return getTypeOfLambdaWithExpectedType(
65224
+ node,
65225
+ expectedFunctionTypes.length > 0 ? expectedFunctionTypes[0] : void 0,
65226
+ inferenceContext,
65227
+ /* forceSpeculative */
65228
+ false
65229
+ );
65230
+ }
65231
+ expectedFunctionTypes = (0, typeUtils_1.sortTypes)(expectedFunctionTypes);
65232
+ for (const expectedFunctionType of expectedFunctionTypes) {
65233
+ const result = getTypeOfLambdaWithExpectedType(
65234
+ node,
65235
+ expectedFunctionType,
65236
+ inferenceContext,
65237
+ /* forceSpeculative */
65238
+ true
65239
+ );
65240
+ if (!result.typeErrors) {
65241
+ return getTypeOfLambdaWithExpectedType(
65242
+ node,
65243
+ expectedFunctionType,
65244
+ inferenceContext,
65245
+ /* forceSpeculative */
65246
+ false
65050
65247
  );
65051
- const hasParamSpec = !!functionType2.details.paramSpec;
65052
- return hasVarArgs || hasParamSpec || functionParamCount >= minLambdaParamCount && functionParamCount <= maxLambdaParamCount;
65053
- });
65248
+ }
65054
65249
  }
65055
- const expectedFunctionType = expectedFunctionTypes.length > 0 ? expectedFunctionTypes[0] : void 0;
65250
+ return getTypeOfLambdaWithExpectedType(
65251
+ node,
65252
+ expectedFunctionTypes[0],
65253
+ inferenceContext,
65254
+ /* forceSpeculative */
65255
+ true
65256
+ );
65257
+ }
65258
+ function getTypeOfLambdaWithExpectedType(node, expectedType, inferenceContext, forceSpeculative) {
65259
+ let isIncomplete = !!(inferenceContext === null || inferenceContext === void 0 ? void 0 : inferenceContext.isTypeIncomplete);
65056
65260
  let paramsArePositionOnly = true;
65057
- const expectedParamDetails = expectedFunctionType ? (0, parameterUtils_1.getParameterListDetails)(expectedFunctionType) : void 0;
65261
+ const expectedParamDetails = expectedType ? (0, parameterUtils_1.getParameterListDetails)(expectedType) : void 0;
65262
+ const functionType = types_1.FunctionType.createInstance(
65263
+ "",
65264
+ "",
65265
+ "",
65266
+ 131072
65267
+ /* PartiallyEvaluated */
65268
+ );
65269
+ functionType.details.typeVarScopeId = ParseTreeUtils.getScopeIdForNode(node);
65270
+ writeTypeCache(
65271
+ node,
65272
+ { type: functionType, isIncomplete: true },
65273
+ 0
65274
+ /* None */
65275
+ );
65058
65276
  node.parameters.forEach((param, index) => {
65059
65277
  let paramType;
65060
65278
  if (expectedParamDetails) {
@@ -65114,8 +65332,9 @@ var require_typeEvaluator = __commonJS({
65114
65332
  type: types_1.UnknownType.create()
65115
65333
  });
65116
65334
  }
65117
- const expectedReturnType = expectedFunctionType ? getFunctionEffectiveReturnType(expectedFunctionType) : void 0;
65118
- useSpeculativeMode(isSpeculativeModeInUse(node) || (inferenceContext === null || inferenceContext === void 0 ? void 0 : inferenceContext.isTypeIncomplete) ? node.expression : void 0, () => {
65335
+ const expectedReturnType = expectedType ? getFunctionEffectiveReturnType(expectedType) : void 0;
65336
+ let typeErrors = false;
65337
+ useSpeculativeMode(forceSpeculative || isSpeculativeModeInUse(node) || (inferenceContext === null || inferenceContext === void 0 ? void 0 : inferenceContext.isTypeIncomplete) ? node.expression : void 0, () => {
65119
65338
  const returnTypeResult = getTypeOfExpression(
65120
65339
  node.expression,
65121
65340
  /* flags */
@@ -65126,11 +65345,17 @@ var require_typeEvaluator = __commonJS({
65126
65345
  if (returnTypeResult.isIncomplete) {
65127
65346
  isIncomplete = true;
65128
65347
  }
65348
+ if (returnTypeResult.typeErrors) {
65349
+ typeErrors = true;
65350
+ }
65129
65351
  }, {
65130
- dependentType: inferenceContext === null || inferenceContext === void 0 ? void 0 : inferenceContext.expectedType
65352
+ dependentType: expectedType
65131
65353
  });
65132
65354
  functionType.details.flags &= ~131072;
65133
- return { type: functionType, isIncomplete };
65355
+ if (expectedType && !assignType(expectedType, functionType)) {
65356
+ typeErrors = true;
65357
+ }
65358
+ return { type: functionType, isIncomplete, typeErrors };
65134
65359
  }
65135
65360
  function getTypeOfListComprehension(node, inferenceContext) {
65136
65361
  var _a;
@@ -66619,14 +66844,12 @@ var require_typeEvaluator = __commonJS({
66619
66844
  } else {
66620
66845
  metaclassNode = arg.valueExpression;
66621
66846
  }
66622
- } else if (types_1.ClassType.isTypedDictClass(classType) && (arg.name.value === "total" || arg.name.value === "readonly")) {
66847
+ } else if (types_1.ClassType.isTypedDictClass(classType) && arg.name.value === "total") {
66623
66848
  const constArgValue = (0, staticExpressions_1.evaluateStaticBoolExpression)(arg.valueExpression, fileInfo.executionEnvironment, fileInfo.definedConstants);
66624
66849
  if (constArgValue === void 0) {
66625
66850
  addError(localize_1.Localizer.Diagnostic.typedDictBoolParam().format({ name: arg.name.value }), arg.valueExpression);
66626
66851
  } else if (arg.name.value === "total" && !constArgValue) {
66627
66852
  classType.details.flags |= 256;
66628
- } else if (arg.name.value === "readonly" && constArgValue) {
66629
- classType.details.flags |= 512;
66630
66853
  }
66631
66854
  } else {
66632
66855
  initSubclassArgs.push({
@@ -69355,6 +69578,16 @@ var require_typeEvaluator = __commonJS({
69355
69578
  /* Parameter */
69356
69579
  );
69357
69580
  }
69581
+ const parameterDetails = (0, parameterUtils_1.getParameterListDetails)(type);
69582
+ if (parameterDetails.unpackedKwargsTypedDictType) {
69583
+ const lookupResults = (0, typeUtils_1.lookUpClassMember)(parameterDetails.unpackedKwargsTypedDictType, paramName);
69584
+ if (lookupResults) {
69585
+ return lookupResults.symbol.getDeclarations().find(
69586
+ (decl) => decl.type === 1
69587
+ /* Variable */
69588
+ );
69589
+ }
69590
+ }
69358
69591
  }
69359
69592
  }
69360
69593
  }
@@ -69666,12 +69899,18 @@ var require_typeEvaluator = __commonJS({
69666
69899
  if (cachedTypeVarType && (0, types_1.isTypeVar)(cachedTypeVarType)) {
69667
69900
  return cachedTypeVarType;
69668
69901
  }
69669
- let typeVar = types_1.TypeVarType.createInstantiable(node.name.value);
69902
+ let runtimeClassName = "TypeVar";
69903
+ if (node.typeParamCategory === parseNodes_1.TypeParameterCategory.TypeVarTuple) {
69904
+ runtimeClassName = "TypeVarTuple";
69905
+ } else if (node.typeParamCategory === parseNodes_1.TypeParameterCategory.ParamSpec) {
69906
+ runtimeClassName = "ParamSpec";
69907
+ }
69908
+ const runtimeType = getTypingType(node, runtimeClassName);
69909
+ const runtimeClass = runtimeType && (0, types_1.isInstantiableClass)(runtimeType) ? runtimeType : void 0;
69910
+ let typeVar = types_1.TypeVarType.createInstantiable(node.name.value, node.typeParamCategory === parseNodes_1.TypeParameterCategory.ParamSpec, runtimeClass);
69670
69911
  typeVar.details.isTypeParamSyntax = true;
69671
69912
  if (node.typeParamCategory === parseNodes_1.TypeParameterCategory.TypeVarTuple) {
69672
69913
  typeVar.details.isVariadic = true;
69673
- } else if (node.typeParamCategory === parseNodes_1.TypeParameterCategory.ParamSpec) {
69674
- typeVar.details.isParamSpec = true;
69675
69914
  }
69676
69915
  writeTypeCache(
69677
69916
  node,
@@ -69953,7 +70192,6 @@ var require_typeEvaluator = __commonJS({
69953
70192
  return getEffectiveTypeOfSymbolForUsage(symbol).type;
69954
70193
  }
69955
70194
  function getEffectiveTypeOfSymbolForUsage(symbol, usageNode, useLastDecl = false) {
69956
- var _a, _b;
69957
70195
  let declaredTypeInfo;
69958
70196
  if (symbol.hasTypedDeclarations()) {
69959
70197
  declaredTypeInfo = getDeclaredTypeOfSymbol(symbol, usageNode);
@@ -69986,13 +70224,9 @@ var require_typeEvaluator = __commonJS({
69986
70224
  let cacheEntries = effectiveTypeCache.get(symbol.id);
69987
70225
  const usageNodeId = usageNode ? usageNode.id : void 0;
69988
70226
  const effectiveTypeCacheKey = `${usageNodeId === void 0 ? "." : usageNodeId.toString()}${useLastDecl ? "*" : ""}`;
69989
- if (cacheEntries) {
69990
- const result2 = cacheEntries.get(effectiveTypeCacheKey);
69991
- if (result2) {
69992
- if (!result2.isIncomplete) {
69993
- return result2;
69994
- }
69995
- }
70227
+ const cacheEntry = cacheEntries === null || cacheEntries === void 0 ? void 0 : cacheEntries.get(effectiveTypeCacheKey);
70228
+ if (cacheEntry && !cacheEntry.isIncomplete) {
70229
+ return cacheEntry;
69996
70230
  }
69997
70231
  const decls = symbol.getDeclarations();
69998
70232
  let declIndexToConsider;
@@ -70028,7 +70262,7 @@ var require_typeEvaluator = __commonJS({
70028
70262
  const declsToConsider = [];
70029
70263
  let sawExplicitTypeAlias = false;
70030
70264
  decls.forEach((decl, index) => {
70031
- var _a2, _b2, _c;
70265
+ var _a, _b, _c;
70032
70266
  if (declIndexToConsider !== void 0 && declIndexToConsider !== index) {
70033
70267
  return;
70034
70268
  }
@@ -70049,26 +70283,25 @@ var require_typeEvaluator = __commonJS({
70049
70283
  }
70050
70284
  }
70051
70285
  }
70052
- const resolvedDecl = (_a2 = resolveAliasDeclaration(
70286
+ const resolvedDecl = (_a = resolveAliasDeclaration(
70053
70287
  decl,
70054
70288
  /* resolveLocalNames */
70055
70289
  true,
70056
70290
  {
70057
70291
  allowExternallyHiddenAccess: AnalyzerNodeInfo.getFileInfo(decl.node).isStubFile
70058
70292
  }
70059
- )) !== null && _a2 !== void 0 ? _a2 : decl;
70293
+ )) !== null && _a !== void 0 ? _a : decl;
70060
70294
  const isExplicitTypeAlias = isExplicitTypeAliasDeclaration(resolvedDecl);
70061
70295
  const isTypeAlias = isExplicitTypeAlias || isPossibleTypeAliasOrTypedDict(resolvedDecl);
70062
70296
  if (isExplicitTypeAlias) {
70063
70297
  sawExplicitTypeAlias = true;
70064
70298
  }
70065
- if (isTypeAlias && resolvedDecl.type === 1 && ((_c = (_b2 = resolvedDecl.inferredTypeSource) === null || _b2 === void 0 ? void 0 : _b2.parent) === null || _c === void 0 ? void 0 : _c.nodeType) === 3) {
70299
+ if (isTypeAlias && resolvedDecl.type === 1 && ((_c = (_b = resolvedDecl.inferredTypeSource) === null || _b === void 0 ? void 0 : _b.parent) === null || _c === void 0 ? void 0 : _c.nodeType) === 3) {
70066
70300
  evaluateTypesForAssignmentStatement(resolvedDecl.inferredTypeSource.parent);
70067
70301
  }
70068
70302
  declsToConsider.push(resolvedDecl);
70069
70303
  });
70070
- const evaluationAttempts = ((_b = (_a = cacheEntries === null || cacheEntries === void 0 ? void 0 : cacheEntries.get(effectiveTypeCacheKey)) === null || _a === void 0 ? void 0 : _a.evaluationAttempts) !== null && _b !== void 0 ? _b : 0) + 1;
70071
- const result = getTypeOfSymbolForDecls(symbol, declsToConsider, evaluationAttempts);
70304
+ const result = getTypeOfSymbolForDecls(symbol, declsToConsider, effectiveTypeCacheKey);
70072
70305
  if (!result.includesSpeculativeResult) {
70073
70306
  addToEffectiveTypeCache(result);
70074
70307
  }
@@ -70081,7 +70314,8 @@ var require_typeEvaluator = __commonJS({
70081
70314
  cacheEntries.set(effectiveTypeCacheKey, result2);
70082
70315
  }
70083
70316
  }
70084
- function getTypeOfSymbolForDecls(symbol, decls, evaluationAttempts) {
70317
+ function getTypeOfSymbolForDecls(symbol, decls, typeCacheKey) {
70318
+ var _a, _b;
70085
70319
  const typesToCombine = [];
70086
70320
  let isIncomplete = false;
70087
70321
  let sawPendingEvaluation = false;
@@ -70135,6 +70369,8 @@ var require_typeEvaluator = __commonJS({
70135
70369
  sawPendingEvaluation = true;
70136
70370
  }
70137
70371
  });
70372
+ const cacheEntries = effectiveTypeCache.get(symbol.id);
70373
+ const evaluationAttempts = ((_b = (_a = cacheEntries === null || cacheEntries === void 0 ? void 0 : cacheEntries.get(typeCacheKey)) === null || _a === void 0 ? void 0 : _a.evaluationAttempts) !== null && _b !== void 0 ? _b : 0) + 1;
70138
70374
  let type;
70139
70375
  if (typesToCombine.length > 0) {
70140
70376
  isIncomplete = sawPendingEvaluation && evaluationAttempts < maxEffectiveTypeEvaluationAttempts;
@@ -73874,147 +74110,6 @@ var require_typeStubWriter = __commonJS({
73874
74110
  }
73875
74111
  });
73876
74112
 
73877
- // node_modules/@zzzen/pyright-internal/dist/analyzer/sourceFileInfo.js
73878
- var require_sourceFileInfo = __commonJS({
73879
- "node_modules/@zzzen/pyright-internal/dist/analyzer/sourceFileInfo.js"(exports) {
73880
- "use strict";
73881
- Object.defineProperty(exports, "__esModule", { value: true });
73882
- exports.SourceFileInfo = void 0;
73883
- var SourceFileInfo = class {
73884
- constructor(sourceFile, isTypeshedFile, isThirdPartyImport, isThirdPartyPyTypedPresent, _editModeTracker, args = {}) {
73885
- this.sourceFile = sourceFile;
73886
- this.isTypeshedFile = isTypeshedFile;
73887
- this.isThirdPartyImport = isThirdPartyImport;
73888
- this.isThirdPartyPyTypedPresent = isThirdPartyPyTypedPresent;
73889
- this._editModeTracker = _editModeTracker;
73890
- this.isCreatedInEditMode = this._editModeTracker.isEditMode;
73891
- this._writableData = this._createWriteableData(args);
73892
- this._cachePreEditState();
73893
- }
73894
- get diagnosticsVersion() {
73895
- return this._writableData.diagnosticsVersion;
73896
- }
73897
- get builtinsImport() {
73898
- return this._writableData.builtinsImport;
73899
- }
73900
- get ipythonDisplayImport() {
73901
- return this._writableData.ipythonDisplayImport;
73902
- }
73903
- // Information about the chained source file
73904
- // Chained source file is not supposed to exist on file system but
73905
- // must exist in the program's source file list. Module level
73906
- // scope of the chained source file will be inserted before
73907
- // current file's scope.
73908
- get chainedSourceFile() {
73909
- return this._writableData.chainedSourceFile;
73910
- }
73911
- get effectiveFutureImports() {
73912
- return this._writableData.effectiveFutureImports;
73913
- }
73914
- // Information about why the file is included in the program
73915
- // and its relation to other source files in the program.
73916
- get isTracked() {
73917
- return this._writableData.isTracked;
73918
- }
73919
- get isOpenByClient() {
73920
- return this._writableData.isOpenByClient;
73921
- }
73922
- get imports() {
73923
- return this._writableData.imports;
73924
- }
73925
- get importedBy() {
73926
- return this._writableData.importedBy;
73927
- }
73928
- get shadows() {
73929
- return this._writableData.shadows;
73930
- }
73931
- get shadowedBy() {
73932
- return this._writableData.shadowedBy;
73933
- }
73934
- set diagnosticsVersion(value) {
73935
- this._cachePreEditState();
73936
- this._writableData.diagnosticsVersion = value;
73937
- }
73938
- set builtinsImport(value) {
73939
- this._cachePreEditState();
73940
- this._writableData.builtinsImport = value;
73941
- }
73942
- set ipythonDisplayImport(value) {
73943
- this._cachePreEditState();
73944
- this._writableData.ipythonDisplayImport = value;
73945
- }
73946
- set chainedSourceFile(value) {
73947
- this._cachePreEditState();
73948
- this._writableData.chainedSourceFile = value;
73949
- }
73950
- set effectiveFutureImports(value) {
73951
- this._cachePreEditState();
73952
- this._writableData.effectiveFutureImports = value;
73953
- }
73954
- set isTracked(value) {
73955
- this._cachePreEditState();
73956
- this._writableData.isTracked = value;
73957
- }
73958
- set isOpenByClient(value) {
73959
- this._cachePreEditState();
73960
- this._writableData.isOpenByClient = value;
73961
- }
73962
- mutate(callback) {
73963
- this._cachePreEditState();
73964
- callback(this._writableData);
73965
- }
73966
- restore() {
73967
- if (this._preEditData) {
73968
- this._writableData = this._preEditData;
73969
- this._preEditData = void 0;
73970
- this.sourceFile.dropParseAndBindInfo();
73971
- }
73972
- return this.sourceFile.restore();
73973
- }
73974
- _cachePreEditState() {
73975
- if (!this._editModeTracker.isEditMode || this._preEditData) {
73976
- return;
73977
- }
73978
- this._preEditData = this._writableData;
73979
- this._writableData = this._cloneWriteableData(this._writableData);
73980
- this._editModeTracker.addMutatedFiles(this);
73981
- }
73982
- _createWriteableData(args) {
73983
- var _a, _b;
73984
- return {
73985
- isTracked: (_a = args.isTracked) !== null && _a !== void 0 ? _a : false,
73986
- isOpenByClient: (_b = args.isOpenByClient) !== null && _b !== void 0 ? _b : false,
73987
- builtinsImport: args.builtinsImport,
73988
- chainedSourceFile: args.chainedSourceFile,
73989
- diagnosticsVersion: args.diagnosticsVersion,
73990
- effectiveFutureImports: args.effectiveFutureImports,
73991
- ipythonDisplayImport: args.ipythonDisplayImport,
73992
- imports: [],
73993
- importedBy: [],
73994
- shadows: [],
73995
- shadowedBy: []
73996
- };
73997
- }
73998
- _cloneWriteableData(data) {
73999
- return {
74000
- isTracked: data.isTracked,
74001
- isOpenByClient: data.isOpenByClient,
74002
- builtinsImport: data.builtinsImport,
74003
- chainedSourceFile: data.chainedSourceFile,
74004
- diagnosticsVersion: data.diagnosticsVersion,
74005
- effectiveFutureImports: data.effectiveFutureImports,
74006
- ipythonDisplayImport: data.ipythonDisplayImport,
74007
- imports: data.imports.slice(),
74008
- importedBy: data.importedBy.slice(),
74009
- shadows: data.shadows.slice(),
74010
- shadowedBy: data.shadowedBy.slice()
74011
- };
74012
- }
74013
- };
74014
- exports.SourceFileInfo = SourceFileInfo;
74015
- }
74016
- });
74017
-
74018
74113
  // node_modules/@zzzen/pyright-internal/dist/analyzer/program.js
74019
74114
  var require_program = __commonJS({
74020
74115
  "node_modules/@zzzen/pyright-internal/dist/analyzer/program.js"(exports) {
@@ -74068,12 +74163,12 @@ var require_program = __commonJS({
74068
74163
  var circularDependency_1 = require_circularDependency();
74069
74164
  var parseTreeUtils_1 = require_parseTreeUtils();
74070
74165
  var sourceFile_1 = require_sourceFile();
74166
+ var sourceFileInfo_1 = require_sourceFileInfo();
74071
74167
  var sourceFileInfoUtils_1 = require_sourceFileInfoUtils();
74072
74168
  var sourceMapper_1 = require_sourceMapper();
74073
74169
  var tracePrinter_1 = require_tracePrinter();
74074
74170
  var typeEvaluatorWithTracker_1 = require_typeEvaluatorWithTracker();
74075
74171
  var typeStubWriter_1 = require_typeStubWriter();
74076
- var sourceFileInfo_1 = require_sourceFileInfo();
74077
74172
  var _maxImportDepth = 256;
74078
74173
  var ISourceFileFactory;
74079
74174
  (function(ISourceFileFactory2) {
@@ -74105,7 +74200,8 @@ var require_program = __commonJS({
74105
74200
  }
74106
74201
  };
74107
74202
  var Program = class _Program {
74108
- constructor(initialImportResolver, initialConfigOptions, serviceProvider, logTracker, _disableChecker, cacheManager, id) {
74203
+ constructor(initialImportResolver, initialConfigOptions, serviceProvider, logTracker, _disableChecker, id) {
74204
+ var _a;
74109
74205
  this.serviceProvider = serviceProvider;
74110
74206
  this._disableChecker = _disableChecker;
74111
74207
  this._sourceFileList = [];
@@ -74113,7 +74209,7 @@ var require_program = __commonJS({
74113
74209
  this._parsedFileCount = 0;
74114
74210
  this._editModeTracker = new EditModeTracker();
74115
74211
  this._lookUpImport = (filePathOrModule, options) => {
74116
- var _a;
74212
+ var _a2;
74117
74213
  let sourceFileInfo;
74118
74214
  if (typeof filePathOrModule === "string") {
74119
74215
  sourceFileInfo = this.getSourceFileInfo(filePathOrModule);
@@ -74169,7 +74265,7 @@ var require_program = __commonJS({
74169
74265
  return {
74170
74266
  symbolTable,
74171
74267
  dunderAllNames: dunderAllInfo === null || dunderAllInfo === void 0 ? void 0 : dunderAllInfo.names,
74172
- usesUnsupportedDunderAllForm: (_a = dunderAllInfo === null || dunderAllInfo === void 0 ? void 0 : dunderAllInfo.usesUnsupportedDunderAllForm) !== null && _a !== void 0 ? _a : false,
74268
+ usesUnsupportedDunderAllForm: (_a2 = dunderAllInfo === null || dunderAllInfo === void 0 ? void 0 : dunderAllInfo.usesUnsupportedDunderAllForm) !== null && _a2 !== void 0 ? _a2 : false,
74173
74269
  get docString() {
74174
74270
  return (0, parseTreeUtils_1.getDocString)(moduleNode.statements);
74175
74271
  },
@@ -74181,7 +74277,7 @@ var require_program = __commonJS({
74181
74277
  this._importResolver = initialImportResolver;
74182
74278
  this._configOptions = initialConfigOptions;
74183
74279
  this._sourceFileFactory = serviceProvider.sourceFileFactory();
74184
- this._cacheManager = cacheManager !== null && cacheManager !== void 0 ? cacheManager : new cacheManager_1.CacheManager();
74280
+ this._cacheManager = (_a = serviceProvider.tryGet(serviceProviderExtensions_1.ServiceKeys.cacheManager)) !== null && _a !== void 0 ? _a : new cacheManager_1.CacheManager();
74185
74281
  this._cacheManager.registerCacheOwner(this);
74186
74282
  this._createNewEvaluator();
74187
74283
  this._id = id !== null && id !== void 0 ? id : `Prog_${_Program._nextId}`;
@@ -75079,12 +75175,6 @@ var require_program = __commonJS({
75079
75175
  const resolvedBuiltinsPath = builtinsImport.resolvedPaths[builtinsImport.resolvedPaths.length - 1];
75080
75176
  sourceFileInfo.builtinsImport = this.getSourceFileInfo(resolvedBuiltinsPath);
75081
75177
  }
75082
- sourceFileInfo.ipythonDisplayImport = void 0;
75083
- const ipythonDisplayImport = sourceFileInfo.sourceFile.getIPythonDisplayImport();
75084
- if (ipythonDisplayImport && ipythonDisplayImport.isImportFound) {
75085
- const resolvedIPythonDisplayPath = ipythonDisplayImport.resolvedPaths[ipythonDisplayImport.resolvedPaths.length - 1];
75086
- sourceFileInfo.ipythonDisplayImport = this.getSourceFileInfo(resolvedIPythonDisplayPath);
75087
- }
75088
75178
  return filesAdded;
75089
75179
  }
75090
75180
  _removeSourceFileFromListAndMap(filePath, indexToRemove) {
@@ -75143,27 +75233,19 @@ var require_program = __commonJS({
75143
75233
  return shadowFileInfo.sourceFile;
75144
75234
  }
75145
75235
  _createInterimFileInfo(filePath) {
75146
- const importName = this._getImportNameForFile(filePath);
75147
- const sourceFile = this._sourceFileFactory.createSourceFile(
75148
- this.serviceProvider,
75236
+ const moduleImportInfo = this._importResolver.getModuleNameForImport(
75149
75237
  filePath,
75150
- importName,
75151
- /* isThirdPartyImport */
75152
- false,
75153
- /* isInPyTypedPackage */
75154
- false,
75155
- this._editModeTracker,
75156
- this._console,
75157
- this._logTracker
75238
+ this._configOptions.getDefaultExecEnvironment(),
75239
+ /* allowIllegalModuleName */
75240
+ true
75158
75241
  );
75242
+ const sourceFile = this._sourceFileFactory.createSourceFile(this.serviceProvider, filePath, moduleImportInfo.moduleName, moduleImportInfo.importType === 1, moduleImportInfo.isThirdPartyPyTypedPresent, this._editModeTracker, this._console, this._logTracker);
75159
75243
  const sourceFileInfo = new sourceFileInfo_1.SourceFileInfo(
75160
75244
  sourceFile,
75161
75245
  /* isTypeshedFile */
75162
75246
  false,
75163
- /* isThirdPartyImport */
75164
- false,
75165
- /* isThirdPartyPyTypedPresent */
75166
- false,
75247
+ moduleImportInfo.importType === 1,
75248
+ moduleImportInfo.isThirdPartyPyTypedPresent,
75167
75249
  this._editModeTracker
75168
75250
  );
75169
75251
  return sourceFileInfo;
@@ -75197,7 +75279,7 @@ var require_program = __commonJS({
75197
75279
  }
75198
75280
  }
75199
75281
  _getImplicitImports(file) {
75200
- var _a, _b;
75282
+ var _a;
75201
75283
  if (file.builtinsImport === file) {
75202
75284
  return void 0;
75203
75285
  }
@@ -75207,7 +75289,7 @@ var require_program = __commonJS({
75207
75289
  }
75208
75290
  return input;
75209
75291
  };
75210
- return (_b = (_a = tryReturn(file.chainedSourceFile)) !== null && _a !== void 0 ? _a : tryReturn(file.ipythonDisplayImport)) !== null && _b !== void 0 ? _b : file.builtinsImport;
75292
+ return (_a = tryReturn(file.chainedSourceFile)) !== null && _a !== void 0 ? _a : file.builtinsImport;
75211
75293
  }
75212
75294
  _bindImplicitImports(fileToAnalyze, skipFileNeededCheck) {
75213
75295
  const implicitImports = [];
@@ -75246,7 +75328,7 @@ var require_program = __commonJS({
75246
75328
  // Binds the specified file and all of its dependencies, recursively. If
75247
75329
  // it runs out of time, it returns true. If it completes, it returns false.
75248
75330
  _bindFile(fileToAnalyze, content, skipFileNeededCheck, isImplicitImport) {
75249
- var _a, _b;
75331
+ var _a;
75250
75332
  if (!this._isFileNeeded(fileToAnalyze, skipFileNeededCheck) || !fileToAnalyze.sourceFile.isBindingRequired()) {
75251
75333
  return;
75252
75334
  }
@@ -75270,7 +75352,7 @@ var require_program = __commonJS({
75270
75352
  if (!isImplicitImport) {
75271
75353
  this._bindImplicitImports(fileToAnalyze);
75272
75354
  }
75273
- builtinsScope = (_b = (_a = getScopeIfAvailable(fileToAnalyze.chainedSourceFile)) !== null && _a !== void 0 ? _a : getScopeIfAvailable(fileToAnalyze.ipythonDisplayImport)) !== null && _b !== void 0 ? _b : getScopeIfAvailable(fileToAnalyze.builtinsImport);
75355
+ builtinsScope = (_a = getScopeIfAvailable(fileToAnalyze.chainedSourceFile)) !== null && _a !== void 0 ? _a : getScopeIfAvailable(fileToAnalyze.builtinsImport);
75274
75356
  }
75275
75357
  let futureImports = fileToAnalyze.sourceFile.getParseResults().futureImports;
75276
75358
  if (fileToAnalyze.chainedSourceFile) {
@@ -75973,6 +76055,7 @@ var require_serviceProviderExtensions = __commonJS({
75973
76055
  "use strict";
75974
76056
  Object.defineProperty(exports, "__esModule", { value: true });
75975
76057
  exports.createServiceProvider = exports.ServiceKeys = void 0;
76058
+ var cacheManager_1 = require_cacheManager();
75976
76059
  var program_1 = require_program();
75977
76060
  var sourceFile_1 = require_sourceFile();
75978
76061
  var pyrightFileSystem_1 = require_pyrightFileSystem();
@@ -75989,6 +76072,7 @@ var require_serviceProviderExtensions = __commonJS({
75989
76072
  ServiceKeys2.symbolUsageProviderFactory = new serviceProvider_1.GroupServiceKey();
75990
76073
  ServiceKeys2.stateMutationListeners = new serviceProvider_1.GroupServiceKey();
75991
76074
  ServiceKeys2.tempFile = new serviceProvider_1.ServiceKey();
76075
+ ServiceKeys2.cacheManager = new serviceProvider_1.ServiceKey();
75992
76076
  })(ServiceKeys = exports.ServiceKeys || (exports.ServiceKeys = {}));
75993
76077
  function createServiceProvider(...services2) {
75994
76078
  const sp = new serviceProvider_1.ServiceProvider();
@@ -76008,6 +76092,9 @@ var require_serviceProviderExtensions = __commonJS({
76008
76092
  if (fileSystem_1.TempFile.is(service)) {
76009
76093
  sp.add(ServiceKeys.tempFile, service);
76010
76094
  }
76095
+ if (cacheManager_1.CacheManager.is(service)) {
76096
+ sp.add(ServiceKeys.cacheManager, service);
76097
+ }
76011
76098
  });
76012
76099
  return sp;
76013
76100
  }
@@ -76074,8 +76161,8 @@ var require_pathUtils = __commonJS({
76074
76161
  var core_1 = require_core();
76075
76162
  var crypto_1 = require_crypto();
76076
76163
  var debug = __importStar(require_debug2());
76077
- var stringUtils_1 = require_stringUtils();
76078
76164
  var serviceProviderExtensions_1 = require_serviceProviderExtensions();
76165
+ var stringUtils_1 = require_stringUtils();
76079
76166
  var _fsCaseSensitivity = void 0;
76080
76167
  var _underTest = false;
76081
76168
  var _includeFileRegex = /\.pyi?$/;
@@ -76149,7 +76236,12 @@ var require_pathUtils = __commonJS({
76149
76236
  }
76150
76237
  }
76151
76238
  if (isUri(pathString)) {
76152
- return vscode_uri_1.URI.parse(pathString).scheme.length + 3;
76239
+ const uri = vscode_uri_1.URI.parse(pathString);
76240
+ if (uri.authority) {
76241
+ return uri.scheme.length + 3;
76242
+ } else {
76243
+ return uri.scheme.length + 2;
76244
+ }
76153
76245
  }
76154
76246
  return 0;
76155
76247
  }
@@ -78318,15 +78410,7 @@ var require_binder = __commonJS({
78318
78410
  var _a, _b;
78319
78411
  this._disableTrueFalseTargets(() => {
78320
78412
  this.walk(node.leftExpression);
78321
- const positionalArgs = node.arguments.filter(
78322
- (arg) => !arg.name && arg.argumentCategory !== 2
78323
- /* UnpackedDictionary */
78324
- );
78325
- const keywordArgs = node.arguments.filter(
78326
- (arg) => !!arg.name || arg.argumentCategory === 2
78327
- /* UnpackedDictionary */
78328
- );
78329
- const sortedArgs = positionalArgs.concat(keywordArgs);
78413
+ const sortedArgs = ParseTreeUtils.getArgumentsByRuntimeOrder(node);
78330
78414
  sortedArgs.forEach((argNode) => {
78331
78415
  if (this._currentFlowNode) {
78332
78416
  AnalyzerNodeInfo.setFlowNode(argNode, this._currentFlowNode);
@@ -82513,6 +82597,7 @@ var require_importResolver = __commonJS({
82513
82597
  var pathConsts_1 = require_pathConsts();
82514
82598
  var pathUtils_1 = require_pathUtils();
82515
82599
  var pythonVersion_1 = require_pythonVersion();
82600
+ var serviceProviderExtensions_1 = require_serviceProviderExtensions();
82516
82601
  var StringUtils = __importStar(require_stringUtils());
82517
82602
  var stringUtils_1 = require_stringUtils();
82518
82603
  var characters_1 = require_characters();
@@ -82522,7 +82607,6 @@ var require_importResolver = __commonJS({
82522
82607
  var PythonPathUtils = __importStar(require_pythonPathUtils());
82523
82608
  var SymbolNameUtils = __importStar(require_symbolNameUtils());
82524
82609
  var symbolNameUtils_1 = require_symbolNameUtils();
82525
- var serviceProviderExtensions_1 = require_serviceProviderExtensions();
82526
82610
  function createImportedModuleDescriptor(moduleName) {
82527
82611
  if (moduleName.length === 0) {
82528
82612
  return { leadingDots: 0, nameParts: [], importedSymbols: /* @__PURE__ */ new Set() };
@@ -83145,6 +83229,7 @@ var require_importResolver = __commonJS({
83145
83229
  let moduleName;
83146
83230
  let importType = 0;
83147
83231
  let isLocalTypingsFile = false;
83232
+ let isThirdPartyPyTypedPresent = false;
83148
83233
  const importFailureInfo = [];
83149
83234
  let moduleNameWithInvalidCharacters;
83150
83235
  const stdLibTypeshedPath = this._getStdlibTypeshedPath(this._configOptions.typeshedPath, execEnv.pythonVersion, importFailureInfo);
@@ -83157,7 +83242,12 @@ var require_importResolver = __commonJS({
83157
83242
  importedSymbols: void 0
83158
83243
  };
83159
83244
  if (this._isStdlibTypeshedStubValidForVersion(moduleDescriptor, this._configOptions.typeshedPath, execEnv.pythonVersion, [])) {
83160
- return { moduleName, importType, isLocalTypingsFile };
83245
+ return {
83246
+ moduleName,
83247
+ importType,
83248
+ isLocalTypingsFile,
83249
+ isThirdPartyPyTypedPresent
83250
+ };
83161
83251
  }
83162
83252
  }
83163
83253
  }
@@ -83237,13 +83327,41 @@ var require_importResolver = __commonJS({
83237
83327
  }
83238
83328
  }
83239
83329
  }
83330
+ if (importType === 1) {
83331
+ const root = this.getParentImportResolutionRoot(filePath, execEnv.root);
83332
+ let current = (0, pathUtils_1.ensureTrailingDirectorySeparator)((0, pathUtils_1.getDirectoryPath)(filePath));
83333
+ while (this._shouldWalkUp(current, root, execEnv)) {
83334
+ if (this.fileExistsCached((0, pathUtils_1.combinePaths)(current, "py.typed"))) {
83335
+ const pyTypedInfo = (0, pyTypedUtils_1.getPyTypedInfo)(this.fileSystem, current);
83336
+ if (pyTypedInfo && !pyTypedInfo.isPartiallyTyped) {
83337
+ isThirdPartyPyTypedPresent = true;
83338
+ }
83339
+ break;
83340
+ }
83341
+ let success;
83342
+ [success, current] = this._tryWalkUp(current);
83343
+ if (!success) {
83344
+ break;
83345
+ }
83346
+ }
83347
+ }
83240
83348
  if (moduleName) {
83241
- return { moduleName, importType, isLocalTypingsFile };
83349
+ return { moduleName, importType, isLocalTypingsFile, isThirdPartyPyTypedPresent };
83242
83350
  }
83243
83351
  if (allowInvalidModuleName && moduleNameWithInvalidCharacters) {
83244
- return { moduleName: moduleNameWithInvalidCharacters, importType, isLocalTypingsFile };
83352
+ return {
83353
+ moduleName: moduleNameWithInvalidCharacters,
83354
+ importType,
83355
+ isLocalTypingsFile,
83356
+ isThirdPartyPyTypedPresent
83357
+ };
83245
83358
  }
83246
- return { moduleName: "", importType: 2, isLocalTypingsFile };
83359
+ return {
83360
+ moduleName: "",
83361
+ importType: 2,
83362
+ isLocalTypingsFile,
83363
+ isThirdPartyPyTypedPresent
83364
+ };
83247
83365
  }
83248
83366
  _invalidateFileSystemCache() {
83249
83367
  this._cachedEntriesForPath.clear();
@@ -89003,9 +89121,6 @@ var require_sourceFile = __commonJS({
89003
89121
  getBuiltinsImport() {
89004
89122
  return this._writableData.builtinsImport;
89005
89123
  }
89006
- getIPythonDisplayImport() {
89007
- return this._writableData.ipythonDisplayImport;
89008
- }
89009
89124
  getModuleSymbolTable() {
89010
89125
  return this._writableData.moduleSymbolTable;
89011
89126
  }
@@ -89210,7 +89325,6 @@ var require_sourceFile = __commonJS({
89210
89325
  const importResult = this._resolveImports(importResolver, parseResults.importedModules, execEnvironment);
89211
89326
  this._writableData.imports = importResult.imports;
89212
89327
  this._writableData.builtinsImport = importResult.builtinsImportResult;
89213
- this._writableData.ipythonDisplayImport = importResult.ipythonDisplayImportResult;
89214
89328
  this._writableData.parseDiagnostics = diagSink.fetchAndClear();
89215
89329
  });
89216
89330
  const useStrict = configOptions.strict.find((strictFileSpec) => strictFileSpec.regExp.test(this._realFilePath)) !== void 0;
@@ -89244,7 +89358,6 @@ var require_sourceFile = __commonJS({
89244
89358
  };
89245
89359
  this._writableData.imports = void 0;
89246
89360
  this._writableData.builtinsImport = void 0;
89247
- this._writableData.ipythonDisplayImport = void 0;
89248
89361
  const diagSink2 = this.createDiagnosticSink();
89249
89362
  diagSink2.addError(localize_1.Localizer.Diagnostic.internalParseError().format({ file: this.getFilePath(), message }), (0, textRange_1.getEmptyRange)());
89250
89363
  this._writableData.parseDiagnostics = diagSink2.fetchAndClear();
@@ -89597,7 +89710,6 @@ var require_sourceFile = __commonJS({
89597
89710
  if (!builtinsImportResult) {
89598
89711
  builtinsImportResult = resolveAndAddIfNotSelf(["builtins"]);
89599
89712
  }
89600
- const ipythonDisplayImportResult = this._ipythonMode ? resolveAndAddIfNotSelf(["IPython", "display"]) : void 0;
89601
89713
  for (const moduleImport of moduleImports) {
89602
89714
  const importResult = importResolver.resolveImport(this._filePath, execEnv, {
89603
89715
  leadingDots: moduleImport.leadingDots,
@@ -89615,8 +89727,7 @@ var require_sourceFile = __commonJS({
89615
89727
  }
89616
89728
  return {
89617
89729
  imports,
89618
- builtinsImportResult,
89619
- ipythonDisplayImportResult
89730
+ builtinsImportResult
89620
89731
  };
89621
89732
  }
89622
89733
  _getPathForLogging(filepath) {