Python: Fix consistency test failures

As we now have many more capturing closure arguments, we must once again
exclude the ones that don't actually have `argumentOf` defined.
This commit is contained in:
Taus
2026-01-29 17:06:21 +00:00
parent 3f718123a6
commit fb6175d10b

View File

@@ -143,6 +143,10 @@ private module Input implements InputSig<Location, PythonDataFlow> {
// Because of this, we must exclude the cases where we have an approximation but no actual
// argument node.
arg = getCallArgApproximation() and not getCallArg(_, _, _, arg, _)
or
// Likewise, capturing closure arguments do not have corresponding argument nodes in some cases.
arg instanceof SynthCapturedVariablesArgumentNode and
not arg.argumentOf(_, _)
}
}