From 4bc248704fcd2d4752573fc56847dace0beca630 Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Mon, 27 May 2019 09:53:46 -0400 Subject: [PATCH] Elide template in repr for Layout objects --- plotly/basedatatypes.py | 6 ++++++ 1 file changed, 6 insertions(+) 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,