@@ -3273,7 +3273,7 @@ def _perform_batch_animate(self, animation_opts):
32733273
32743274 # Exports
32753275 # -------
3276- def to_dict (self , clone = True ):
3276+ def to_dict (self ):
32773277 """
32783278 Convert figure to a dictionary
32793279
@@ -3286,41 +3286,32 @@ def to_dict(self, clone=True):
32863286 """
32873287 # Handle data
32883288 # -----------
3289- if clone :
3290- data = deepcopy (self ._data )
3291- else :
3292- data = self ._data
3289+ data = deepcopy (self ._data )
32933290
32943291 # Handle layout
32953292 # -------------
3296- if clone :
3297- layout = deepcopy (self ._layout )
3298- else :
3299- layout = self ._layout
3293+ layout = deepcopy (self ._layout )
33003294
33013295 # Handle frames
33023296 # -------------
33033297 # Frame key is only added if there are any frames
33043298 res = {"data" : data , "layout" : layout }
3305- if clone :
3306- frames = deepcopy ([frame ._props for frame in self ._frame_objs ])
3307- else :
3308- frames = [frame ._props for frame in self ._frame_objs ]
3299+ frames = deepcopy ([frame ._props for frame in self ._frame_objs ])
33093300
33103301 if frames :
33113302 res ["frames" ] = frames
33123303
33133304 return res
33143305
3315- def to_plotly_json (self , clone = True ):
3306+ def to_plotly_json (self ):
33163307 """
33173308 Convert figure to a JSON representation as a Python dict
33183309
33193310 Returns
33203311 -------
33213312 dict
33223313 """
3323- return self .to_dict (clone = clone )
3314+ return self .to_dict ()
33243315
33253316 @staticmethod
33263317 def _to_ordered_dict (d , skip_uid = False ):
@@ -5550,18 +5541,15 @@ def on_change(self, callback, *args, **kwargs):
55505541 # -----------------
55515542 self ._change_callbacks [arg_tuples ].append (callback )
55525543
5553- def to_plotly_json (self , clone = True ):
5544+ def to_plotly_json (self ):
55545545 """
55555546 Return plotly JSON representation of object as a Python dict
55565547
55575548 Returns
55585549 -------
55595550 dict
55605551 """
5561- if clone :
5562- return deepcopy (self ._props if self ._props is not None else {})
5563- else :
5564- return self ._props if self ._props is not None else {}
5552+ return deepcopy (self ._props if self ._props is not None else {})
55655553
55665554 @staticmethod
55675555 def _vals_equal (v1 , v2 ):
0 commit comments