Skip to content

Commit 668eb90

Browse files
committed
black
1 parent 1947333 commit 668eb90

File tree

4 files changed

+54
-36
lines changed

4 files changed

+54
-36
lines changed

packages/python/plotly/plotly/express/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@
8383
"choropleth",
8484
"pie",
8585
"sunburst",
86-
"funnel"
87-
"funnel_area"
88-
"imshow",
86+
"funnel" "funnel_area" "imshow",
8987
"data",
9088
"colors",
9189
"set_mapbox_access_token",

packages/python/plotly/plotly/express/_chart_types.py

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,11 @@ def pie(
11301130
width=None,
11311131
height=None,
11321132
opacity=None,
1133-
):
1133+
):
11341134
"""
11351135
In a pie plot, each row of `data_frame` is represented as a sector of a pie.
11361136
"""
1137-
return make_figure(
1138-
args=locals(),
1139-
constructor=go.Pie,
1140-
)
1137+
return make_figure(args=locals(), constructor=go.Pie,)
11411138

11421139

11431140
pie.__doc__ = make_docstring(pie)
@@ -1159,21 +1156,20 @@ def sunburst(
11591156
height=None,
11601157
branchvalues=None,
11611158
maxdepth=None,
1162-
):
1159+
):
11631160
"""
11641161
In a pie plot, each row of `data_frame` is represented as a sector of a pie.
11651162
"""
11661163
return make_figure(
11671164
args=locals(),
11681165
constructor=go.Sunburst,
1169-
trace_patch=dict(branchvalues=branchvalues, maxdepth=maxdepth)
1166+
trace_patch=dict(branchvalues=branchvalues, maxdepth=maxdepth),
11701167
)
11711168

11721169

11731170
sunburst.__doc__ = make_docstring(sunburst)
11741171

11751172

1176-
11771173
def funnel(
11781174
data_frame=None,
11791175
x=None,
@@ -1192,7 +1188,7 @@ def funnel(
11921188
width=None,
11931189
height=None,
11941190
opacity=None,
1195-
):
1191+
):
11961192
"""
11971193
In a funnel plot, each row of `data_frame` is represented as a rectangular sector of a funnel.
11981194
"""
@@ -1203,7 +1199,15 @@ def funnel(
12031199
)
12041200

12051201

1206-
funnel.__doc__ = make_docstring(funnel, override_dict=dict(textinfo=["str", "Determines which trace information appear on the graph. In the case of having multiple funnels, percentages & totals are computed separately (per trace)."]))
1202+
funnel.__doc__ = make_docstring(
1203+
funnel,
1204+
override_dict=dict(
1205+
textinfo=[
1206+
"str",
1207+
"Determines which trace information appear on the graph. In the case of having multiple funnels, percentages & totals are computed separately (per trace).",
1208+
]
1209+
),
1210+
)
12071211

12081212

12091213
def funnel_area(
@@ -1219,14 +1223,19 @@ def funnel_area(
12191223
template=None,
12201224
width=None,
12211225
height=None,
1222-
):
1226+
):
12231227
"""
12241228
In a funnel area plot, each row of `data_frame` is represented as a trapezoidal sector of a funnel.
12251229
"""
1226-
return make_figure(
1227-
args=locals(),
1228-
constructor=go.Funnelarea,
1229-
)
1230-
1231-
1232-
funnel_area.__doc__ = make_docstring(funnel_area, override_dict=dict(textinfo=["str", "Determines which trace information appear on the graph. In the case of having multiple funnels, percentages & totals are computed separately (per trace)."]))
1230+
return make_figure(args=locals(), constructor=go.Funnelarea,)
1231+
1232+
1233+
funnel_area.__doc__ = make_docstring(
1234+
funnel_area,
1235+
override_dict=dict(
1236+
textinfo=[
1237+
"str",
1238+
"Determines which trace information appear on the graph. In the case of having multiple funnels, percentages & totals are computed separately (per trace).",
1239+
]
1240+
),
1241+
)

packages/python/plotly/plotly/express/_core.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,12 @@ def make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref):
323323
if v:
324324
result[k] = g[v]
325325
mapping_labels[v_label] = "%%{%s}" % k
326-
if trace_spec.constructor not in [go.Parcoords, go.Parcats, go.Sunburst, go.Treemap]:
326+
if trace_spec.constructor not in [
327+
go.Parcoords,
328+
go.Parcats,
329+
go.Sunburst,
330+
go.Treemap,
331+
]:
327332
hover_lines = [k + "=" + v for k, v in mapping_labels.items()]
328333
result["hovertemplate"] = hover_header + "<br>".join(hover_lines)
329334
return result, fit_results
@@ -1013,7 +1018,7 @@ def infer_config(args, constructor, trace_patch):
10131018

10141019
show_colorbar = bool("color" in attrs and args["color"])
10151020
else:
1016-
show_colorbar=False
1021+
show_colorbar = False
10171022

10181023
# Compute line_dash grouping attribute
10191024
if "line_dash" in args:

packages/python/plotly/plotly/express/_doc.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@
6969
values=[
7070
colref_type,
7171
colref_desc,
72-
"Values from this column or array_like are used to set values associated to sectors."
72+
"Values from this column or array_like are used to set values associated to sectors.",
7373
],
7474
parents=[
7575
colref_type,
7676
colref_desc,
77-
"Values from this column or array_like are used to set values associated to sectors."
77+
"Values from this column or array_like are used to set values associated to sectors.",
7878
],
7979
ids=[
8080
colref_type,
8181
colref_desc,
82-
"Values from this column or array_like are used to set values associated to sectors."
82+
"Values from this column or array_like are used to set values associated to sectors.",
8383
],
8484
lat=[
8585
colref_type,
@@ -457,16 +457,22 @@
457457
nbins=["int", "Positive integer.", "Sets the number of bins."],
458458
nbinsx=["int", "Positive integer.", "Sets the number of bins along the x axis."],
459459
nbinsy=["int", "Positive integer.", "Sets the number of bins along the y axis."],
460-
branchvalues=["str", "'total' or 'remainder'",
461-
"Determines how the items in `values` are summed. When"
462-
"set to 'total', items in `values` are taken to be value"
463-
"of all its descendants. When set to 'remainder', items"
464-
"in `values` corresponding to the root and the branches"
465-
":sectors are taken to be the extra part not part of the"
466-
"sum of the values at their leaves."],
467-
maxdepth=["int", "Positive integer",
468-
"Sets the number of rendered sectors from any given `level`. Set `maxdepth` to -1 to render all the"
469-
"levels in the hierarchy."]
460+
branchvalues=[
461+
"str",
462+
"'total' or 'remainder'",
463+
"Determines how the items in `values` are summed. When"
464+
"set to 'total', items in `values` are taken to be value"
465+
"of all its descendants. When set to 'remainder', items"
466+
"in `values` corresponding to the root and the branches"
467+
":sectors are taken to be the extra part not part of the"
468+
"sum of the values at their leaves.",
469+
],
470+
maxdepth=[
471+
"int",
472+
"Positive integer",
473+
"Sets the number of rendered sectors from any given `level`. Set `maxdepth` to -1 to render all the"
474+
"levels in the hierarchy.",
475+
],
470476
)
471477

472478

0 commit comments

Comments
 (0)