Skip to content

Commit 38e0321

Browse files
committed
Python: allow CaptureArgumentNodes as multiple arguemnts
These are the labmda self references. This is similar to how `BlockParameterArgumentNode` is excluded for Ruby. It is important that we restrict `call` in this logic. Otherwise, we get a cartesian product and the consistency check runs for a very long time...
1 parent f32d5e4 commit 38e0321

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/ql/consistency-queries/DataFlowConsistency.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ private module Input implements InputSig<PythonDataFlow> {
140140
arg = other.getArgument(any(ArgumentPosition p | p.isSelf())) and
141141
other.getNode().getScope() = f
142142
)
143+
or
144+
arg = call.getArgument(_) and
145+
arg instanceof CaptureArgumentNode
143146
}
144147
}
145148

0 commit comments

Comments
 (0)