Skip to content

Commit baf0917

Browse files
committed
On saltstack this drops the number of consistency errors
of type uniqueEnclosingCallable from 4026 to 614.
1 parent 527c415 commit baf0917

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,11 @@ ExprNode exprNode(DataFlowExpr e) { result.getNode().getNode() = e }
179179
class ParameterNode extends CfgNode {
180180
ParameterDefinition def;
181181

182-
ParameterNode() { node = def.getDefiningNode() }
182+
ParameterNode() {
183+
node = def.getDefiningNode() and
184+
// Disregard parameters to the function the extractor has synthesised for comprehensions
185+
not def.getScope() = any(Comp comp).getNthInnerLoop(0).getIter().getScope()
186+
}
183187

184188
/**
185189
* Holds if this node is the parameter of callable `c` at the

0 commit comments

Comments
 (0)