Skip to content

Commit 544ae5e

Browse files
committed
Python: more CaptureNode exclusion
1 parent 9815192 commit 544ae5e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ private module Input implements InputSig<PythonDataFlow> {
4949
// In that case, there is no associated DataFlowCallable.
5050
not exists(func.getDefinition())
5151
)
52+
or
53+
// We do not have classes as `DataFlowCallable`s.
54+
n.(CaptureNode).getSynthesizedCaptureNode().getEnclosingCallable() instanceof Class
5255
}
5356

5457
predicate uniqueCallEnclosingCallableExclude(DataFlowCall call) {

0 commit comments

Comments
 (0)