Skip to content

Commit aefae22

Browse files
committed
Python 2 fix (keyword parameter not allowed after *args)
1 parent 59e24ae commit aefae22

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plotly/basedatatypes.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3145,7 +3145,7 @@ def _dispatch_change_callbacks(self, changed_paths):
31453145
for callback in callbacks:
31463146
callback(self, *callback_args)
31473147

3148-
def on_change(self, callback, *args, append=False):
3148+
def on_change(self, callback, *args, **kwargs):
31493149
"""
31503150
Register callback function to be called when certain properties or
31513151
subproperties of this object are modified.
@@ -3215,6 +3215,10 @@ def on_change(self, callback, *args, append=False):
32153215
raise ValueError(
32163216
'Invalid property specification(s): %s' % invalid_args)
32173217

3218+
# Process append option
3219+
# ---------------------
3220+
append = kwargs.get('append', False)
3221+
32183222
# Normalize args to path tuples
32193223
# -----------------------------
32203224
arg_tuples = tuple([BaseFigure._str_to_dict_path(a) for a in args])

0 commit comments

Comments
 (0)