Skip to content

Commit 4cfee5a

Browse files
committed
Make mapped_properties private
1 parent 6240d61 commit 4cfee5a

File tree

41 files changed

+48
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+48
-48
lines changed

codegen/datatypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def _prop_descriptions(self):
206206
if mapped_properties:
207207
buffer.write(f"""
208208
209-
mapped_properties = {repr(mapped_properties)}""")
209+
_mapped_properties = {repr(mapped_properties)}""")
210210

211211
# ### Constructor ###
212212
buffer.write(f"""

plotly/basedatatypes.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -2312,7 +2312,7 @@ class BasePlotlyType(object):
23122312
# ### Mapped (deprecated) properties ###
23132313
# dict for deprecated property name (e.g. 'titlefont') to tuple
23142314
# of relative path to new property (e.g. ('title', 'font')
2315-
mapped_properties = {}
2315+
_mapped_properties = {}
23162316

23172317
def __init__(self, plotly_name, **kwargs):
23182318
"""
@@ -2689,8 +2689,8 @@ def __getitem__(self, prop):
26892689

26902690
# Handle remapping
26912691
# ----------------
2692-
if prop and prop[0] in self.mapped_properties:
2693-
prop = self.mapped_properties[prop[0]] + prop[1:]
2692+
if prop and prop[0] in self._mapped_properties:
2693+
prop = self._mapped_properties[prop[0]] + prop[1:]
26942694

26952695
# Handle scalar case
26962696
# ------------------
@@ -2748,8 +2748,8 @@ def __contains__(self, prop):
27482748
prop = BaseFigure._str_to_dict_path(prop)
27492749

27502750
# Handle remapping
2751-
if prop and prop[0] in self.mapped_properties:
2752-
prop = self.mapped_properties[prop[0]] + prop[1:]
2751+
if prop and prop[0] in self._mapped_properties:
2752+
prop = self._mapped_properties[prop[0]] + prop[1:]
27532753

27542754
obj = self
27552755
for p in prop:
@@ -2796,8 +2796,8 @@ def __setitem__(self, prop, value):
27962796

27972797
# Handle remapping
27982798
# ----------------
2799-
if prop[0] in self.mapped_properties:
2800-
prop = self.mapped_properties[prop[0]] + prop[1:]
2799+
if prop[0] in self._mapped_properties:
2800+
prop = self._mapped_properties[prop[0]] + prop[1:]
28012801

28022802
# Handle scalar case
28032803
# ------------------
@@ -2863,7 +2863,7 @@ def __iter__(self):
28632863
Return an iterator over the object's properties
28642864
"""
28652865
res = list(self._validators.keys())
2866-
for prop in self.mapped_properties:
2866+
for prop in self._mapped_properties:
28672867
res.append(prop)
28682868
return iter(res)
28692869

plotly/graph_objs/_layout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4043,7 +4043,7 @@ def _prop_descriptions(self):
40434043
compatible properties
40444044
"""
40454045

4046-
mapped_properties = {'titlefont': ('title', 'font')}
4046+
_mapped_properties = {'titlefont': ('title', 'font')}
40474047

40484048
def __init__(
40494049
self,

plotly/graph_objs/_pie.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ def _prop_descriptions(self):
14481448
visible).
14491449
"""
14501450

1451-
mapped_properties = {
1451+
_mapped_properties = {
14521452
'titlefont': ('title', 'font'),
14531453
'titleposition': ('title', 'position')
14541454
}

plotly/graph_objs/bar/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ def _prop_descriptions(self):
14231423
direction.
14241424
"""
14251425

1426-
mapped_properties = {
1426+
_mapped_properties = {
14271427
'titlefont': ('title', 'font'),
14281428
'titleside': ('title', 'side')
14291429
}

plotly/graph_objs/barpolar/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ def _prop_descriptions(self):
14251425
direction.
14261426
"""
14271427

1428-
mapped_properties = {
1428+
_mapped_properties = {
14291429
'titlefont': ('title', 'font'),
14301430
'titleside': ('title', 'side')
14311431
}

plotly/graph_objs/carpet/_aaxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1746,7 +1746,7 @@ def _prop_descriptions(self):
17461746
the traces that referenced the axis in question.
17471747
"""
17481748

1749-
mapped_properties = {
1749+
_mapped_properties = {
17501750
'titlefont': ('title', 'font'),
17511751
'titleoffset': ('title', 'offset')
17521752
}

plotly/graph_objs/carpet/_baxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1746,7 +1746,7 @@ def _prop_descriptions(self):
17461746
the traces that referenced the axis in question.
17471747
"""
17481748

1749-
mapped_properties = {
1749+
_mapped_properties = {
17501750
'titlefont': ('title', 'font'),
17511751
'titleoffset': ('title', 'offset')
17521752
}

plotly/graph_objs/choropleth/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ def _prop_descriptions(self):
14231423
direction.
14241424
"""
14251425

1426-
mapped_properties = {
1426+
_mapped_properties = {
14271427
'titlefont': ('title', 'font'),
14281428
'titleside': ('title', 'side')
14291429
}

plotly/graph_objs/cone/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ def _prop_descriptions(self):
14241424
direction.
14251425
"""
14261426

1427-
mapped_properties = {
1427+
_mapped_properties = {
14281428
'titlefont': ('title', 'font'),
14291429
'titleside': ('title', 'side')
14301430
}

plotly/graph_objs/contour/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ def _prop_descriptions(self):
14241424
direction.
14251425
"""
14261426

1427-
mapped_properties = {
1427+
_mapped_properties = {
14281428
'titlefont': ('title', 'font'),
14291429
'titleside': ('title', 'side')
14301430
}

plotly/graph_objs/contourcarpet/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ def _prop_descriptions(self):
14251425
direction.
14261426
"""
14271427

1428-
mapped_properties = {
1428+
_mapped_properties = {
14291429
'titlefont': ('title', 'font'),
14301430
'titleside': ('title', 'side')
14311431
}

plotly/graph_objs/heatmap/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ def _prop_descriptions(self):
14241424
direction.
14251425
"""
14261426

1427-
mapped_properties = {
1427+
_mapped_properties = {
14281428
'titlefont': ('title', 'font'),
14291429
'titleside': ('title', 'side')
14301430
}

plotly/graph_objs/heatmapgl/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ def _prop_descriptions(self):
14231423
direction.
14241424
"""
14251425

1426-
mapped_properties = {
1426+
_mapped_properties = {
14271427
'titlefont': ('title', 'font'),
14281428
'titleside': ('title', 'side')
14291429
}

plotly/graph_objs/histogram/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@ def _prop_descriptions(self):
14261426
direction.
14271427
"""
14281428

1429-
mapped_properties = {
1429+
_mapped_properties = {
14301430
'titlefont': ('title', 'font'),
14311431
'titleside': ('title', 'side')
14321432
}

plotly/graph_objs/histogram2d/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ def _prop_descriptions(self):
14241424
direction.
14251425
"""
14261426

1427-
mapped_properties = {
1427+
_mapped_properties = {
14281428
'titlefont': ('title', 'font'),
14291429
'titleside': ('title', 'side')
14301430
}

plotly/graph_objs/histogram2dcontour/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ def _prop_descriptions(self):
14271427
direction.
14281428
"""
14291429

1430-
mapped_properties = {
1430+
_mapped_properties = {
14311431
'titlefont': ('title', 'font'),
14321432
'titleside': ('title', 'side')
14331433
}

plotly/graph_objs/layout/_xaxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2525,7 +2525,7 @@ def _prop_descriptions(self):
25252525
Sets the width (in px) of the zero line.
25262526
"""
25272527

2528-
mapped_properties = {'titlefont': ('title', 'font')}
2528+
_mapped_properties = {'titlefont': ('title', 'font')}
25292529

25302530
def __init__(
25312531
self,

plotly/graph_objs/layout/_yaxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2393,7 +2393,7 @@ def _prop_descriptions(self):
23932393
Sets the width (in px) of the zero line.
23942394
"""
23952395

2396-
mapped_properties = {'titlefont': ('title', 'font')}
2396+
_mapped_properties = {'titlefont': ('title', 'font')}
23972397

23982398
def __init__(
23992399
self,

plotly/graph_objs/layout/polar/_radialaxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ def _prop_descriptions(self):
16251625
cheater plot is present on the axis, otherwise false
16261626
"""
16271627

1628-
mapped_properties = {'titlefont': ('title', 'font')}
1628+
_mapped_properties = {'titlefont': ('title', 'font')}
16291629

16301630
def __init__(
16311631
self,

plotly/graph_objs/layout/scene/_xaxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ def _prop_descriptions(self):
18891889
Sets the width (in px) of the zero line.
18901890
"""
18911891

1892-
mapped_properties = {'titlefont': ('title', 'font')}
1892+
_mapped_properties = {'titlefont': ('title', 'font')}
18931893

18941894
def __init__(
18951895
self,

plotly/graph_objs/layout/scene/_yaxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ def _prop_descriptions(self):
18891889
Sets the width (in px) of the zero line.
18901890
"""
18911891

1892-
mapped_properties = {'titlefont': ('title', 'font')}
1892+
_mapped_properties = {'titlefont': ('title', 'font')}
18931893

18941894
def __init__(
18951895
self,

plotly/graph_objs/layout/scene/_zaxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ def _prop_descriptions(self):
18891889
Sets the width (in px) of the zero line.
18901890
"""
18911891

1892-
mapped_properties = {'titlefont': ('title', 'font')}
1892+
_mapped_properties = {'titlefont': ('title', 'font')}
18931893

18941894
def __init__(
18951895
self,

plotly/graph_objs/layout/ternary/_aaxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ def _prop_descriptions(self):
13151315
configuration. Defaults to `ternary<N>.uirevision`.
13161316
"""
13171317

1318-
mapped_properties = {'titlefont': ('title', 'font')}
1318+
_mapped_properties = {'titlefont': ('title', 'font')}
13191319

13201320
def __init__(
13211321
self,

plotly/graph_objs/layout/ternary/_baxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ def _prop_descriptions(self):
13151315
configuration. Defaults to `ternary<N>.uirevision`.
13161316
"""
13171317

1318-
mapped_properties = {'titlefont': ('title', 'font')}
1318+
_mapped_properties = {'titlefont': ('title', 'font')}
13191319

13201320
def __init__(
13211321
self,

plotly/graph_objs/layout/ternary/_caxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ def _prop_descriptions(self):
13151315
configuration. Defaults to `ternary<N>.uirevision`.
13161316
"""
13171317

1318-
mapped_properties = {'titlefont': ('title', 'font')}
1318+
_mapped_properties = {'titlefont': ('title', 'font')}
13191319

13201320
def __init__(
13211321
self,

plotly/graph_objs/mesh3d/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ def _prop_descriptions(self):
14241424
direction.
14251425
"""
14261426

1427-
mapped_properties = {
1427+
_mapped_properties = {
14281428
'titlefont': ('title', 'font'),
14291429
'titleside': ('title', 'side')
14301430
}

plotly/graph_objs/parcats/line/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ def _prop_descriptions(self):
14251425
direction.
14261426
"""
14271427

1428-
mapped_properties = {
1428+
_mapped_properties = {
14291429
'titlefont': ('title', 'font'),
14301430
'titleside': ('title', 'side')
14311431
}

plotly/graph_objs/parcoords/line/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ def _prop_descriptions(self):
14251425
direction.
14261426
"""
14271427

1428-
mapped_properties = {
1428+
_mapped_properties = {
14291429
'titlefont': ('title', 'font'),
14301430
'titleside': ('title', 'side')
14311431
}

plotly/graph_objs/scatter/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ def _prop_descriptions(self):
14251425
direction.
14261426
"""
14271427

1428-
mapped_properties = {
1428+
_mapped_properties = {
14291429
'titlefont': ('title', 'font'),
14301430
'titleside': ('title', 'side')
14311431
}

plotly/graph_objs/scatter3d/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@ def _prop_descriptions(self):
14261426
direction.
14271427
"""
14281428

1429-
mapped_properties = {
1429+
_mapped_properties = {
14301430
'titlefont': ('title', 'font'),
14311431
'titleside': ('title', 'side')
14321432
}

plotly/graph_objs/scattercarpet/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ def _prop_descriptions(self):
14271427
direction.
14281428
"""
14291429

1430-
mapped_properties = {
1430+
_mapped_properties = {
14311431
'titlefont': ('title', 'font'),
14321432
'titleside': ('title', 'side')
14331433
}

plotly/graph_objs/scattergeo/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ def _prop_descriptions(self):
14271427
direction.
14281428
"""
14291429

1430-
mapped_properties = {
1430+
_mapped_properties = {
14311431
'titlefont': ('title', 'font'),
14321432
'titleside': ('title', 'side')
14331433
}

plotly/graph_objs/scattergl/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@ def _prop_descriptions(self):
14261426
direction.
14271427
"""
14281428

1429-
mapped_properties = {
1429+
_mapped_properties = {
14301430
'titlefont': ('title', 'font'),
14311431
'titleside': ('title', 'side')
14321432
}

plotly/graph_objs/scattermapbox/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ def _prop_descriptions(self):
14271427
direction.
14281428
"""
14291429

1430-
mapped_properties = {
1430+
_mapped_properties = {
14311431
'titlefont': ('title', 'font'),
14321432
'titleside': ('title', 'side')
14331433
}

plotly/graph_objs/scatterpolar/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ def _prop_descriptions(self):
14271427
direction.
14281428
"""
14291429

1430-
mapped_properties = {
1430+
_mapped_properties = {
14311431
'titlefont': ('title', 'font'),
14321432
'titleside': ('title', 'side')
14331433
}

plotly/graph_objs/scatterpolargl/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ def _prop_descriptions(self):
14281428
direction.
14291429
"""
14301430

1431-
mapped_properties = {
1431+
_mapped_properties = {
14321432
'titlefont': ('title', 'font'),
14331433
'titleside': ('title', 'side')
14341434
}

plotly/graph_objs/scatterternary/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ def _prop_descriptions(self):
14281428
direction.
14291429
"""
14301430

1431-
mapped_properties = {
1431+
_mapped_properties = {
14321432
'titlefont': ('title', 'font'),
14331433
'titleside': ('title', 'side')
14341434
}

plotly/graph_objs/splom/marker/_colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ def _prop_descriptions(self):
14251425
direction.
14261426
"""
14271427

1428-
mapped_properties = {
1428+
_mapped_properties = {
14291429
'titlefont': ('title', 'font'),
14301430
'titleside': ('title', 'side')
14311431
}

0 commit comments

Comments
 (0)