Skip to content

Commit 89e5670

Browse files
committed
Python: Omit all unresolved parameter nodes.
Drops the results further to 139.
1 parent baf0917 commit 89e5670

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ class ParameterNode extends CfgNode {
181181

182182
ParameterNode() {
183183
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()
184+
// Disregard parameters that we cannot resolve
185+
exists(DataFlowCallable c | node = c.getParameter(_))
186186
}
187187

188188
/**

python/ql/test/experimental/dataflow/consistency/dataflow-consistency.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
uniqueEnclosingCallable
2-
| test.py:239:27:239:27 | ControlFlowNode for p | Node should have one enclosing callable but has 0. |
32
uniqueType
43
uniqueNodeLocation
54
missingLocation

0 commit comments

Comments
 (0)