Skip to content

Commit 870de12

Browse files
authored
Elide template in repr for Layout objects (#1582)
1 parent 417fc6d commit 870de12

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: plotly/basedatatypes.py

+6
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,8 @@ def __repr__(self):
411411
terminal/notebook
412412
"""
413413
props = self.to_plotly_json()
414+
415+
# Elide template
414416
template_props = props.get('layout', {}).get('template', {})
415417
if template_props:
416418
props['layout']['template'] = '...'
@@ -3401,6 +3403,10 @@ def __repr__(self):
34013403
if p in self._validators and
34023404
not isinstance(self._validators[p], LiteralValidator)}
34033405

3406+
# Elide template
3407+
if 'template' in props:
3408+
props['template'] = '...'
3409+
34043410
# Build repr string
34053411
repr_str = BasePlotlyType._build_repr_for_class(
34063412
props=props,

0 commit comments

Comments
 (0)