Open auderson opened 5 months ago
from objprint import op def func(): return 1 cc = op(func(), arg_name=True)
maybe it's because here: https://github.com/gaogaotiantian/objprint/blob/7920c8601e86e97fe05a807d820121bac00471b7/src/objprint/frame_analyzer.py#L55-L58
module is None for Jupyter & IPython, but they have file: jupyter:
ipython:
and source can be retrieved with:
Change to source = inspect.getsource(frame) will work:
source = inspect.getsource(frame)
Hmm, okay. I'll admit that I don't use Jupyter so it's never my first priority. I'll take a look at this and see if can be gracefully fixed.
maybe it's because here: https://github.com/gaogaotiantian/objprint/blob/7920c8601e86e97fe05a807d820121bac00471b7/src/objprint/frame_analyzer.py#L55-L58
module is None for Jupyter & IPython, but they have file: jupyter:
ipython:
and source can be retrieved with:
Change to
source = inspect.getsource(frame)
will work: