Conversation
IPython/core/magics/basic.py
Outdated
| md = MagicsDisplay(self.shell.magics_manager, ignore=[]) | ||
| if args.json: | ||
| return md._repr_json_() | ||
| return md |
There was a problem hiding this comment.
Since this is a simple either/or, I would suggest the slightly more immediately explicit
if args.json:
return md._repr_json_()
else:
return mdBut otherwise looks good to me.
Thanks!!
|
Pinging @ccordoba12 for a heads-up on the QtConsole side if this gets merged, so you can sync. Let's wait for his approval before merging - this change is fairly innocuous, but also not urgent and I don't want to force the QtConsole team to do a release due to a compatibility break. |
|
With this change, all looks good to go for me, thanks @s-kai273! @ccordoba12 - I don't want to merge this without your explicit OK so we don't accidentally trigger a problem for you and the QtConsole team, so please let us know if it's OK to merge or you need to first sync on anything else. |
Summary
This PR is based on the discussion in issue#11793.
When executing lsmagic in a Lab environment, the results are returned in JSON format, and following that, I have made it possible to obtain similar ones by adding a
--jsonoption.Change
implementation code reffers to this comment