@zzzen/pyright-internal 1.2.0-dev.20241222 → 1.2.0-dev.20241229

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.
@@ -18831,14 +18831,20 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
18831
18831
  if (p.name) {
18832
18832
  matchedParamCount++;
18833
18833
  }
18834
+ // If this is a *args parameter, assume that it provides
18835
+ // the remaining positional parameters, but also assume
18836
+ // that it is not exhausted and can provide additional
18837
+ // parameters.
18838
+ if (p.category !== 1 /* ParamCategory.ArgsList */) {
18839
+ return;
18840
+ }
18834
18841
  }
18835
- else if ((0, types_1.isPositionOnlySeparator)(p) && remainingParams.length === 0) {
18842
+ if ((0, types_1.isPositionOnlySeparator)(p) && remainingParams.length === 0) {
18836
18843
  // Don't bother pushing a position-only separator if it
18837
18844
  // is the first remaining param.
18845
+ return;
18838
18846
  }
18839
- else {
18840
- remainingParams.push(types_1.FunctionParam.create(p.category, types_1.FunctionType.getParamType(effectiveSrcType, index), p.flags, p.name, types_1.FunctionType.getParamDefaultType(effectiveSrcType, index), p.defaultExpr));
18841
- }
18847
+ remainingParams.push(types_1.FunctionParam.create(p.category, types_1.FunctionType.getParamType(effectiveSrcType, index), p.flags, p.name, types_1.FunctionType.getParamDefaultType(effectiveSrcType, index), p.defaultExpr));
18842
18848
  });
18843
18849
  // If there are remaining parameters and the source and dest do not contain
18844
18850
  // the same ParamSpec, synthesize a function for the remaining parameters.