Skip to content

Commit 9c2c69a

Browse files
committed
sub patch_{} -> get_patch_{}_class
1 parent 179ae70 commit 9c2c69a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: plotly/graph_objs/graph_objs.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ class Trace(PlotlyTrace):
783783

784784

785785
# (3) Patch 'custom' methods into some graph objects
786-
def patch_Data(Data):
786+
def get_patched_data_class(Data):
787787
def to_graph_objs(self, caller=True): # TODO TODO TODO! check logic!
788788
"""Change any nested collections to subclasses of PlotlyDict/List.
789789
@@ -823,10 +823,10 @@ def to_graph_objs(self, caller=True): # TODO TODO TODO! check logic!
823823
Data.to_graph_objs = to_graph_objs # override method!
824824
return Data
825825

826-
Data = patch_Data(Data)
826+
Data = get_patched_data_class(Data)
827827

828828

829-
def patch_Annotations(Annotations):
829+
def get_patched_annotations_class(Annotations):
830830
def to_graph_objs(self, caller=True):
831831
"""Change any nested collections to subclasses of PlotlyDict/List.
832832
@@ -863,10 +863,10 @@ def to_graph_objs(self, caller=True):
863863
Annotations.to_graph_objs = to_graph_objs # override method!
864864
return Annotations
865865

866-
Annotations = patch_Annotations(Annotations)
866+
Annotations = get_patched_annotations_class(Annotations)
867867

868868

869-
def patch_Figure(Figure):
869+
def get_patched_figure_class(Figure):
870870
def __init__(self, *args, **kwargs):
871871
if len(args):
872872
if ('data' not in kwargs) and ('data' not in args[0]):
@@ -882,10 +882,10 @@ def __init__(self, *args, **kwargs):
882882
Figure.__init__ = __init__ # override method!
883883
return Figure
884884

885-
Figure = patch_Figure(Figure)
885+
Figure = get_patched_figure_class(Figure)
886886

887887

888-
def patch_Layout(Layout):
888+
def get_patched_layout_class(Layout):
889889
def __init__(self, *args, **kwargs):
890890
super(Layout, self).__init__(*args, **kwargs)
891891

@@ -1056,7 +1056,7 @@ def force_clean(self, caller=True): # TODO: can't make call to super...
10561056
Layout.force_clean = force_clean # override methods!
10571057
return Layout
10581058

1059-
Layout = patch_Layout(Layout)
1059+
Layout = get_patched_layout_class(Layout)
10601060

10611061

10621062
# (4) NAME_TO_CLASS dict and class-generating function

0 commit comments

Comments
 (0)