-
Notifications
You must be signed in to change notification settings - Fork 6
Description
One thing we should add is the ability to record the return type from a function.
This would help us understand the signatures better.
Also, it could help with another issue, which is that currently we output functions/classes from the modules they are defined in, not the module they are imported from.
We should instead try to output them where they are imported from. However, if multiple libraries import from different locations, we should choose one and have the others be aliases.
One way to do that would be to record the return types from the getattr
calls, so if you did something like import numpy; numpy.arange
we would know the return type of the getattr is the arange function.
We currently record those getattr, but don't have the return type.
If we did, we could infer that any getattr from a module, which returns a class/fn from a different module represents an import alias.