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 @@ -46,6 +46,13 @@ private module Input implements InputSig<PythonDataFlow> {
4646 )
4747 }
4848
49+ predicate uniqueEnclosingCallableExclude ( Node n ) {
50+ // We only have a selection of valid callables.
51+ // For instance, we do not have classes as `DataFlowCallable`s.
52+ not n .( SynthCaptureNode ) .getSynthesizedCaptureNode ( ) .getEnclosingCallable ( ) instanceof Function and
53+ not n .( SynthCaptureNode ) .getSynthesizedCaptureNode ( ) .getEnclosingCallable ( ) instanceof Module
54+ }
55+
4956 predicate uniqueCallEnclosingCallableExclude ( DataFlowCall call ) {
5057 not exists ( call .getLocation ( ) .getFile ( ) .getRelativePath ( ) )
5158 }
@@ -125,7 +132,7 @@ private module Input implements InputSig<PythonDataFlow> {
125132 or
126133 // The capture argument node will be reused for every call to the same callable.
127134 arg = call .getArgument ( _) and
128- arg instanceof CaptureArgumentNode
135+ arg instanceof SynthCaptureArgumentNode
129136 }
130137}
131138
You can’t perform that action at this time.
0 commit comments