Skip to content

Commit 001ff53

Browse files
Run ruff format
1 parent df1a759 commit 001ff53

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

plotly/matplotlylib/renderer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def draw_bar(self, coll):
307307
) # TODO ditto
308308
if len(bar["x"]) > 1:
309309
self.msg += " Heck yeah, I drew that bar chart\n"
310-
(self.plotly_fig.add_trace(bar),)
310+
self.plotly_fig.add_trace(bar)
311311
if bar_gap is not None:
312312
self.plotly_fig["layout"]["bargap"] = bar_gap
313313
else:
@@ -505,7 +505,7 @@ def draw_marked_line(self, **props):
505505
marked_line["x"] = mpltools.mpl_dates_to_datestrings(
506506
marked_line["x"], formatter
507507
)
508-
(self.plotly_fig.add_trace(marked_line),)
508+
self.plotly_fig.add_trace(marked_line)
509509
self.msg += " Heck yeah, I drew that line\n"
510510
elif props["coordinates"] == "axes":
511511
# dealing with legend graphical elements

plotly/matplotlylib/tests/test_renderer.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
from . import plt
44

5+
56
def test_axis_mirror_with_spines_and_ticks():
67
"""Test that mirror=True when both spines and ticks are visible on both sides."""
78
fig, ax = plt.subplots()
89
ax.plot([0, 1], [0, 1])
910

1011
# Show all spines
11-
ax.spines['top'].set_visible(True)
12-
ax.spines['bottom'].set_visible(True)
13-
ax.spines['left'].set_visible(True)
14-
ax.spines['right'].set_visible(True)
12+
ax.spines["top"].set_visible(True)
13+
ax.spines["bottom"].set_visible(True)
14+
ax.spines["left"].set_visible(True)
15+
ax.spines["right"].set_visible(True)
1516

1617
# Show ticks on all sides
1718
ax.tick_params(top=True, bottom=True, left=True, right=True)
@@ -28,8 +29,8 @@ def test_axis_mirror_with_ticks_only():
2829
ax.plot([0, 1], [0, 1])
2930

3031
# Hide opposite spines
31-
ax.spines['top'].set_visible(False)
32-
ax.spines['right'].set_visible(False)
32+
ax.spines["top"].set_visible(False)
33+
ax.spines["right"].set_visible(False)
3334

3435
# Show ticks on all sides
3536
ax.tick_params(top=True, bottom=True, left=True, right=True)
@@ -61,13 +62,13 @@ def test_axis_mirror_mixed_configurations():
6162
ax.plot([0, 1], [0, 1])
6263

6364
# X-axis: spines and ticks on both sides (mirror="ticks")
64-
ax.spines['top'].set_visible(True)
65-
ax.spines['bottom'].set_visible(True)
65+
ax.spines["top"].set_visible(True)
66+
ax.spines["bottom"].set_visible(True)
6667
ax.tick_params(top=True, bottom=True)
6768

6869
# Y-axis: spine only on one side (mirror=False)
69-
ax.spines['right'].set_visible(False)
70-
ax.spines['left'].set_visible(True)
70+
ax.spines["right"].set_visible(False)
71+
ax.spines["left"].set_visible(True)
7172
ax.tick_params(left=True, right=True)
7273

7374
plotly_fig = tls.mpl_to_plotly(fig)

0 commit comments

Comments
 (0)