diff --git a/plotly/basedatatypes.py b/plotly/basedatatypes.py index 3144689218f..2cdd78bfa26 100644 --- a/plotly/basedatatypes.py +++ b/plotly/basedatatypes.py @@ -407,6 +407,8 @@ def __repr__(self): terminal/notebook """ props = self.to_plotly_json() + + # Elide template template_props = props.get('layout', {}).get('template', {}) if template_props: props['layout']['template'] = '...' @@ -3400,6 +3402,10 @@ def __repr__(self): if p in self._validators and not isinstance(self._validators[p], LiteralValidator)} + # Elide template + if 'template' in props: + props['template'] = '...' + # Build repr string repr_str = BasePlotlyType._build_repr_for_class( props=props,