-
Notifications
You must be signed in to change notification settings - Fork 189
Description
Doing some testing I found an issue in how the targets are computed.
A construct such as:
def function():
yield sys._getframe()
bbb = foo.bar(
Something(param1, param2=xxx.yyy), {}
)
call()
Is not finding bar properly.
The main issue is that a stack is created and later when a CALL_FUNCTION bytecode is found items are popped from the stack, but the stack is incomplete, so, either the way to deal with the stack becomes much more complete (as we need to deal with much more bytecode to have a complete picture on how the stack would look -- which may not be worth it) or go with a simpler approach to just list the names without validating if those would actually be function calls (which may be reasonable since cases such as accessing properties would also work -- those don't work right now with the current approach).
I'm pending towards implementing the 2nd approach...