from objprint import op
def func():
return 1
cc = op(func(), arg_name=True)

maybe it's because here:
|
module = inspect.getmodule(frame) |
|
if module is None: |
|
return None |
|
source = inspect.getsource(module) |
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:

maybe it's because here:
objprint/src/objprint/frame_analyzer.py
Lines 55 to 58 in 7920c86
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: