mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Python: remove unneeded consistency exclusion
This commit is contained in:
@@ -46,24 +46,6 @@ private module Input implements InputSig<PythonDataFlow> {
|
||||
)
|
||||
}
|
||||
|
||||
predicate uniqueEnclosingCallableExclude(Node n) {
|
||||
// `CaptureNode`s miss enclosing calables in some cases.
|
||||
exists(Function func |
|
||||
func = n.(SynthCaptureNode).getSynthesizedCaptureNode().getEnclosingCallable()
|
||||
|
|
||||
// This can happen if `func` is a comprehension.
|
||||
// In that case, there is no associated DataFlowCallable.
|
||||
not exists(func.getDefinition())
|
||||
or
|
||||
func.getADecorator().(Name).getId() = "property"
|
||||
)
|
||||
or
|
||||
// We only have a selection of valid callables.
|
||||
// For instance, we do not have classes as `DataFlowCallable`s.
|
||||
not n.(SynthCaptureNode).getSynthesizedCaptureNode().getEnclosingCallable() instanceof Function and
|
||||
not n.(SynthCaptureNode).getSynthesizedCaptureNode().getEnclosingCallable() instanceof Module
|
||||
}
|
||||
|
||||
predicate uniqueCallEnclosingCallableExclude(DataFlowCall call) {
|
||||
not exists(call.getLocation().getFile().getRelativePath())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user