Skip to content

Commit a3853d2

Browse files
committed
Ruff
1 parent 076ff14 commit a3853d2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

plotly/express/_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,9 +1053,9 @@ def apply_default_cascade(args, constructor):
10531053
if hasattr(trace_data, "marker")
10541054
and hasattr(trace_data.marker, "color")
10551055
]
1056-
# If template contains at least one color for this trace type, assign to color_discrete_sequence
1057-
if any(trace_specific_colors):
1058-
args["color_discrete_sequence"] = trace_specific_colors
1056+
# If template contains at least one color for this trace type, assign to color_discrete_sequence
1057+
if any(trace_specific_colors):
1058+
args["color_discrete_sequence"] = trace_specific_colors
10591059
# fallback to layout.colorway if trace-specific colors not available
10601060
if args["color_discrete_sequence"] is None and args["template"].layout.colorway:
10611061
args["color_discrete_sequence"] = args["template"].layout.colorway

tests/test_optional/test_px/test_px.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from itertools import permutations
22
import warnings
33

4+
import pandas as pd
45
import plotly.express as px
56
import plotly.io as pio
67
import narwhals.stable.v1 as nw
@@ -227,8 +228,6 @@ def test_px_templates(backend):
227228

228229

229230
def test_px_templates_trace_specific_colors(backend):
230-
import pandas as pd
231-
232231
tips = px.data.tips(return_type=backend)
233232

234233
# trace-specific colors: each trace type uses its own template colors

0 commit comments

Comments
 (0)