File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -701,13 +701,16 @@ def _ipython_display_(self, **kwargs):
701701 """Called when `IPython.display.display` is called on the widget."""
702702 if self ._view_name is not None :
703703
704+ plaintext = repr (self )
705+ if len (plaintext ) > 110 :
706+ plaintext = plaintext [:110 ] + '…'
704707 # The 'application/vnd.jupyter.widget-view+json' mimetype has not been registered yet.
705708 # See the registration process and naming convention at
706709 # http://tools.ietf.org/html/rfc6838
707710 # and the currently registered mimetypes at
708711 # http://www.iana.org/assignments/media-types/media-types.xhtml.
709712 data = {
710- 'text/plain' : repr ( self ) ,
713+ 'text/plain' : plaintext ,
711714 'application/vnd.jupyter.widget-view+json' : {
712715 'version_major' : 2 ,
713716 'version_minor' : 0 ,
You can’t perform that action at this time.
0 commit comments