File tree Expand file tree Collapse file tree
python/ql/consistency-queries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ private module Input implements InputSig<PythonDataFlow> {
4949 predicate uniqueEnclosingCallableExclude ( Node n ) {
5050 // `CaptureNode`s miss enclosing calables in some cases.
5151 exists ( Function func |
52- func = n .( CaptureNode ) .getSynthesizedCaptureNode ( ) .getEnclosingCallable ( )
52+ func = n .( SynthCaptureNode ) .getSynthesizedCaptureNode ( ) .getEnclosingCallable ( )
5353 |
5454 // This can happen if `func` is a comprehension.
5555 // In that case, there is no associated DataFlowCallable.
@@ -60,8 +60,8 @@ private module Input implements InputSig<PythonDataFlow> {
6060 or
6161 // We only have a selection of valid callables.
6262 // 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
6565 }
6666
6767 predicate uniqueCallEnclosingCallableExclude ( DataFlowCall call ) {
@@ -141,6 +141,7 @@ private module Input implements InputSig<PythonDataFlow> {
141141 other .getNode ( ) .getScope ( ) = f
142142 )
143143 or
144+ // The capture argument node will be reused for every call to the same callable.
144145 arg = call .getArgument ( _) and
145146 arg instanceof CaptureArgumentNode
146147 }
You can’t perform that action at this time.
0 commit comments