Skip to content

Commit fb6175d

Browse files
committed
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.
1 parent 3f71812 commit fb6175d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/ql/consistency-queries/DataFlowConsistency.ql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ private module Input implements InputSig<Location, PythonDataFlow> {
143143
// Because of this, we must exclude the cases where we have an approximation but no actual
144144
// argument node.
145145
arg = getCallArgApproximation() and not getCallArg(_, _, _, arg, _)
146+
or
147+
// Likewise, capturing closure arguments do not have corresponding argument nodes in some cases.
148+
arg instanceof SynthCapturedVariablesArgumentNode and
149+
not arg.argumentOf(_, _)
146150
}
147151
}
148152

0 commit comments

Comments
 (0)