Skip to content

Commit a761ee4

Browse files
committed
make black happy
1 parent b39e460 commit a761ee4

File tree

1 file changed

+10
-8
lines changed
  • packages/python/plotly/plotly/express

1 file changed

+10
-8
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,8 @@ def make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref):
258258
result[error_xy] = {}
259259
result[error_xy][arr] = g[v]
260260
elif k == "custom_data":
261-
result["customdata"] = np.hstack(
262-
(result["customdata"], g[v].values))
263-
custom_data_len += len(v) # number of custom data columns
261+
result["customdata"] = np.hstack((result["customdata"], g[v].values))
262+
custom_data_len += len(v) # number of custom data columns
264263
elif k == "hover_name":
265264
if trace_spec.constructor not in [
266265
go.Histogram,
@@ -277,11 +276,13 @@ def make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref):
277276
go.Histogram2dContour,
278277
]:
279278
result["customdata"] = np.hstack(
280-
(result["customdata"], g[v].values))
279+
(result["customdata"], g[v].values)
280+
)
281281
for i, col in enumerate(v):
282282
v_label_col = get_decorated_label(args, col, None)
283-
mapping_labels[v_label_col] = (
284-
"%%{customdata[%d]}" % (i + custom_data_len))
283+
mapping_labels[v_label_col] = "%%{customdata[%d]}" % (
284+
i + custom_data_len
285+
)
285286
elif k == "color":
286287
if trace_spec.constructor == go.Choropleth:
287288
result["z"] = g[v]
@@ -753,8 +754,9 @@ def apply_default_cascade(args):
753754
def infer_config(args, constructor, trace_patch):
754755
# Declare all supported attributes, across all plot types
755756
attrables = (
756-
["x", "y", "z", "a", "b", "c", "r", "theta", "size"]
757-
+ ["dimensions", "custom_data", "hover_name", "hover_data", "text", "error_x", "error_x_minus"]
757+
["x", "y", "z", "a", "b", "c", "r", "theta", "size", "dimensions"]
758+
+ ["custom_data", "hover_name", "hover_data", "text"]
759+
+ ["error_x", "error_x_minus"]
758760
+ ["error_y", "error_y_minus", "error_z", "error_z_minus"]
759761
+ ["lat", "lon", "locations", "animation_group"]
760762
)

0 commit comments

Comments
 (0)