python: variaous fixes

- sync summary files
- format files
- fix compilation
This commit is contained in:
yoff
2022-04-29 10:20:33 +00:00
committed by GitHub
parent f14ee0e794
commit da3634188d
7 changed files with 61 additions and 40 deletions

View File

@@ -49,6 +49,12 @@ abstract class RoutingTest extends InlineExpectationsTest {
pragma[inline]
private string toFunc(DataFlow::Node toNode) {
result = toNode.getEnclosingCallable().(DataFlowPrivate::NonLibraryDataFlowCallable).getCallableValue().getScope().getQualifiedName() // TODO: More robust pretty printing?
result =
toNode
.getEnclosingCallable()
.(DataFlowPrivate::NonLibraryDataFlowCallable)
.getCallableValue()
.getScope()
.getQualifiedName() // TODO: More robust pretty printing?
}
}

View File

@@ -58,13 +58,16 @@ private class SummarizedCallableMap extends SummarizedCallable {
preservesValue = true
}
}
// Typetracking needs to use a local flow step not including summaries
// Typetracking needs to use a call graph not including summaries
private class SummarizedCallableJsonLoads extends SummarizedCallable {
SummarizedCallableJsonLoads() { this = "json.loads" }
override Call getACall() {
result = API::moduleImport("json").getMember("loads").getACall().asExpr()
}
override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
input = "Argument[0]" and
output = "ReturnValue.ListElement" and