Open
Conversation
fperez
requested changes
Mar 12, 2024
IPython/core/magics/basic.py
Outdated
| md = MagicsDisplay(self.shell.magics_manager, ignore=[]) | ||
| if args.json: | ||
| return md._repr_json_() | ||
| return md |
Member
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!!
Author
Member
|
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. |
Member
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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