Skip to content

Commit 5b6ea15

Browse files
committed
Python: remove unneeded consistency exclusion
1 parent bfdcae4 commit 5b6ea15

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

python/ql/consistency-queries/DataFlowConsistency.ql

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,6 @@ private module Input implements InputSig<PythonDataFlow> {
4646
)
4747
}
4848

49-
predicate uniqueEnclosingCallableExclude(Node n) {
50-
// `CaptureNode`s miss enclosing calables in some cases.
51-
exists(Function func |
52-
func = n.(SynthCaptureNode).getSynthesizedCaptureNode().getEnclosingCallable()
53-
|
54-
// This can happen if `func` is a comprehension.
55-
// In that case, there is no associated DataFlowCallable.
56-
not exists(func.getDefinition())
57-
or
58-
func.getADecorator().(Name).getId() = "property"
59-
)
60-
or
61-
// We only have a selection of valid callables.
62-
// For instance, we do not have classes as `DataFlowCallable`s.
63-
not n.(SynthCaptureNode).getSynthesizedCaptureNode().getEnclosingCallable() instanceof Function and
64-
not n.(SynthCaptureNode).getSynthesizedCaptureNode().getEnclosingCallable() instanceof Module
65-
}
66-
6749
predicate uniqueCallEnclosingCallableExclude(DataFlowCall call) {
6850
not exists(call.getLocation().getFile().getRelativePath())
6951
}

0 commit comments

Comments
 (0)