We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a87e79 commit a68c928Copy full SHA for a68c928
python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll
@@ -40,6 +40,17 @@ private module Input implements InputSig<PythonDataFlow> {
40
)
41
}
42
43
+ predicate uniqueEnclosingCallableExclude(Node n) {
44
+ // `CaptureNode`s miss enclosing calables in some cases.
45
+ exists(Function func |
46
+ func = n.(CaptureNode).getSynthesizedCaptureNode().getEnclosingCallable()
47
+ |
48
+ // This can happen if `func` is a comprehension.
49
+ // In that case, there is no associated DataFlowCallable.
50
+ not exists(func.getDefinition())
51
+ )
52
+ }
53
+
54
predicate uniqueCallEnclosingCallableExclude(DataFlowCall call) {
55
not exists(call.getLocation().getFile().getRelativePath())
56
0 commit comments