File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
python/ql/consistency-queries Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ private module Input implements InputSig<PythonDataFlow> {
49
49
predicate uniqueEnclosingCallableExclude ( Node n ) {
50
50
// `CaptureNode`s miss enclosing calables in some cases.
51
51
exists ( Function func |
52
- func = n .( CaptureNode ) .getSynthesizedCaptureNode ( ) .getEnclosingCallable ( )
52
+ func = n .( SynthCaptureNode ) .getSynthesizedCaptureNode ( ) .getEnclosingCallable ( )
53
53
|
54
54
// This can happen if `func` is a comprehension.
55
55
// In that case, there is no associated DataFlowCallable.
@@ -60,8 +60,8 @@ private module Input implements InputSig<PythonDataFlow> {
60
60
or
61
61
// We only have a selection of valid callables.
62
62
// For instance, we do not have classes as `DataFlowCallable`s.
63
- not n .( CaptureNode ) .getSynthesizedCaptureNode ( ) .getEnclosingCallable ( ) instanceof Function and
64
- not n .( CaptureNode ) .getSynthesizedCaptureNode ( ) .getEnclosingCallable ( ) instanceof Module
63
+ not n .( SynthCaptureNode ) .getSynthesizedCaptureNode ( ) .getEnclosingCallable ( ) instanceof Function and
64
+ not n .( SynthCaptureNode ) .getSynthesizedCaptureNode ( ) .getEnclosingCallable ( ) instanceof Module
65
65
}
66
66
67
67
predicate uniqueCallEnclosingCallableExclude ( DataFlowCall call ) {
@@ -141,6 +141,7 @@ private module Input implements InputSig<PythonDataFlow> {
141
141
other .getNode ( ) .getScope ( ) = f
142
142
)
143
143
or
144
+ // The capture argument node will be reused for every call to the same callable.
144
145
arg = call .getArgument ( _) and
145
146
arg instanceof CaptureArgumentNode
146
147
}
You can’t perform that action at this time.
0 commit comments