Skip to content

Commit 663a386

Browse files
committed
Fix repr for Python 2
1 parent ee5e647 commit 663a386

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: plotly/utils.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def _list_repr_elided(v, threshold=200, edgeitems=3, indent=0, width=80):
575575
return v_wrapped
576576

577577

578-
class ElidedWrapper:
578+
class ElidedWrapper(object):
579579
"""
580580
Helper class that wraps values of certain types and produces a custom
581581
__repr__() that may be elided and is suitable for use during pretty
@@ -645,7 +645,7 @@ class ElidedPrettyPrinter(PrettyPrinter):
645645
"""
646646
def __init__(self, *args, **kwargs):
647647
self.threshold = kwargs.pop('threshold', 200)
648-
super(ElidedPrettyPrinter, self).__init__(*args, **kwargs)
648+
PrettyPrinter.__init__(self, *args, **kwargs)
649649

650650
def _format(self, val, stream, indent, allowance, context, level):
651651
if ElidedWrapper.is_wrappable(val):
@@ -655,5 +655,5 @@ def _format(self, val, stream, indent, allowance, context, level):
655655
return self._format(
656656
elided_val, stream, indent, allowance, context, level)
657657
else:
658-
return super(ElidedPrettyPrinter, self)._format(
659-
val, stream, indent, allowance, context, level)
658+
return PrettyPrinter._format(
659+
self, val, stream, indent, allowance, context, level)

0 commit comments

Comments
 (0)