New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added clear kwarg to display() #12823
Conversation
@martinRenou What do you think about this? Also, not sure why it failed... I think a formatting rule, but I couldn't get "dark" to re-format it. |
I have no objections with that; if it's ok with the xeus folks to make sure we don't have diverging implementation. |
I must admit that I don't understand the consistency check with xeus. There are quite a few kernels that have "display" functions. Is there some project to try to keep some core functionality consistent across kernels? If so, metakernel should be in the loop. Anyway, if you point me to the xeus implementation, I can make a PR there too. |
Now that xeus-python depends on IPython there should not be any problem on our side :) It should work out of the box with this change. |
@Carreau I guess this is ready then? |
Rebased on master and applied autoformatting where linter was complaining. |
Test are passing, merging. Shis should be automatically backported and will thus be release at end of month. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
Backport PR #12823: Added clear kwarg to display()
display() is a very useful function in the ipython kernel (especially now that it is in scope by default). However, many times that I use it, I also need
clear_output()
, andclear_output(wait=True)
. However, it is quite a pain to have to:In addition, many user don't know about
clear_output
, nor the wait option.This PR adds
display(clear=True)
withwait=True
by default. If you want to clear it now rather than later, you can: