Python: class callable -> class call

Only have one type of callable, but have an extra type of call.
A constructor call directs to an init callable
(should also handle `call` overrides at some point).
This commit is contained in:
Rasmus Lerchedahl Petersen
2020-09-18 22:11:21 +02:00
parent b2f1c435a8
commit 9aa0cfb35c
9 changed files with 370 additions and 343 deletions

View File

@@ -11,7 +11,7 @@ class ArgumentRoutingConfig extends DataFlow::Configuration {
exists(AssignmentDefinition def, DataFlow::DataFlowCall call |
def.getVariable() = node.(DataFlow::EssaNode).getVar() and
def.getValue() = call.getNode() and
call.getCallable().getName().matches("With\\_%")
call.getNode().(CallNode).getNode().(Call).toString().matches("With\\_%") // TODO: Do not rely on toString
) and
node.(DataFlow::EssaNode).getVar().getName().matches("with\\_%")
}