From fb6175d10b24116a98fbda185b922a41ae426085 Mon Sep 17 00:00:00 2001 From: Taus Date: Thu, 29 Jan 2026 17:06:21 +0000 Subject: [PATCH] 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. --- python/ql/consistency-queries/DataFlowConsistency.ql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ql/consistency-queries/DataFlowConsistency.ql b/python/ql/consistency-queries/DataFlowConsistency.ql index 62bbb3062c2..829aa6debef 100644 --- a/python/ql/consistency-queries/DataFlowConsistency.ql +++ b/python/ql/consistency-queries/DataFlowConsistency.ql @@ -143,6 +143,10 @@ private module Input implements InputSig { // 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(_, _) } }