In our current implementation, any class instantiation call like MyClass() will be included in generated call list, even though they are not regular function calls. This is because they are both parsed to ast nodes of type ast.Call, and there seems to be no difference between ast nodes generated from classs instantiation calls and regular function calls.
What's more, in the following case:
from outside import unknown
unknown()
It seems impossible for us to tell whether “unknown”is a class or a function call solely from the source code or ast nodes generated from it, as the current inspect4py generates results based on the source code and ast nodes parsed from it, without validating whether the function of a function call exists or not, I cannot find an easy way to solve this issue.
In our current implementation, any class instantiation call like
MyClass()
will be included in generated call list, even though they are not regular function calls. This is because they are both parsed to ast nodes of typeast.Call
, and there seems to be no difference between ast nodes generated from classs instantiation calls and regular function calls.What's more, in the following case:
It seems impossible for us to tell whether “unknown”is a class or a function call solely from the source code or ast nodes generated from it, as the current inspect4py generates results based on the source code and ast nodes parsed from it, without validating whether the function of a function call exists or not, I cannot find an easy way to solve this issue.