Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e964783

Browse files
committed
Fix D209
1 parent 7b376d5 commit e964783

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

lib/matplotlib/tests/test_axes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9074,7 +9074,8 @@ def test_ylabel_ha_with_position(ha):
90749074
@pytest.mark.parametrize('rotation', [0, 45, 90, 135, 180, 270, -90])
90759075
def test_ylabel_no_overlap_with_ticklabels(label_position, rotation):
90769076
"""Regression test for #19029: a y-label with rotation other than 90°
9077-
must not overlap the tick labels regardless of label_position."""
9077+
must not overlap the tick labels regardless of label_position.
9078+
"""
90789079
fig, ax = plt.subplots()
90799080
ax.plot([1, 3, 2])
90809081
ax.yaxis.set_label_position(label_position)
@@ -9098,7 +9099,8 @@ def test_align_ylabels_mixed_rotation(label_position):
90989099
"""Issue #19029: ``fig.align_ylabels`` must keep two y-labels visually
90999100
aligned even when they use different rotations. The per-axis overhang
91009101
correction in `_update_label_position` shifts each axis independently;
9101-
this test guards against that breaking sibling alignment."""
9102+
this test guards against that breaking sibling alignment.
9103+
"""
91029104
fig, axs = plt.subplots(2, figsize=(4, 6))
91039105
for ax in axs:
91049106
ax.plot([1, 30, 2])

lib/matplotlib/tests/test_colorbar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,8 @@ def test_colorbar_label():
735735

736736
def test_colorbar_label_rotation_no_overlap():
737737
"""Smoke test for #19029: a rotation=270 colorbar label must not
738-
overlap negative tick labels (the original user-facing symptom)."""
738+
overlap negative tick labels (the original user-facing symptom).
739+
"""
739740
fig, ax = plt.subplots()
740741
im = ax.imshow([[-100, 0], [50, 100]])
741742
cbar = fig.colorbar(im, ax=ax)

0 commit comments

Comments
 (0)