You could likely achieve this with a custom profiler <https://docs.python.org/3/library/sys.html#sys.setprofile>. The profiler would provide you with the calling function and the return value; you'd have to implement the other business logic. MonkeyType <https://github.com/Instagram/MonkeyType> is a good example a custom profiler. Have a look at the call tracer <https://github.com/Instagram/MonkeyType/blob/master/monkeytype/tracing.py#L176> to understand arguments returned by a custom profiler. This approach would allow this hinting tool to work as a cell magic or context manager.
-- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/55e0cb09-9901-4618-a5b0-56009b63035c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
