Python: ObjectAPI to ValueAPI: ReturnValueIgnored: Adds prototype version of getAnInferredReturnType

This commit is contained in:
Rebecca Valentine
2020-03-31 22:11:58 -07:00
parent 7ce905a310
commit 42388b0d97
2 changed files with 7 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ predicate returns_meaningful_value(FunctionValue f) {
or
/* Is f a builtin function that returns something other than None?
* Ignore __import__ as it is often called purely for side effects */
f.isBuiltin() and f.getAnInferredReturnType() != theNoneType() and not f.getName() = "__import__"
f.isBuiltin() and f.getAnInferredReturnType() != ClassValue::nonetype() and not f.getName() = "__import__"
)
}