8000 Backport PR #17976: Fixed #17970 - Docstrings should not accessed wit… · matplotlib/matplotlib@9e5e337 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e5e337

Browse files
QuLogicmeeseeksmachine
authored andcommitted
Backport PR #17976: Fixed #17970 - Docstrings should not accessed with -OO
1 parent 765b30a commit 9e5e337

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5302,8 +5302,10 @@ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
53025302
"x", x, y1, y2,
53035303
where=where, interpolate=interpolate, step=step, **kwargs)
53045304

5305-
fill_between.__doc__ = _fill_between_x_or_y.__doc__.format(
5306-
dir="horizontal", ind="x", dep="y")
5305+
if _fill_between_x_or_y.__doc__:
5306+
fill_between.__doc__ = _fill_between_x_or_y.__doc__.format(
5307+
dir="horizontal", ind="x", dep="y"
5308+
)
53075309
fill_between = _preprocess_data(
53085310
docstring.dedent_interpd(fill_between),
53095311
replace_names=["x", "y1", "y2", "where"])
@@ -5314,8 +5316,10 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
53145316
"y", y, x1, x2,
53155317
where=where, interpolate=interpolate, step=step, **kwargs)
53165318

5317-
fill_betweenx.__doc__ = _fill_between_x_or_y.__doc__.format(
5318-
dir="vertical", ind="y", dep="x")
5319+
if _fill_between_x_or_y.__doc__:
5320+
fill_betweenx.__doc__ = _fill_between_x_or_y.__doc__.format(
5321+
dir="vertical", ind="y", dep="x"
5322+
)
53195323
fill_betweenx = _preprocess_data(
53205324
docstring.dedent_interpd(fill_betweenx),
53215325
replace_names=["y", "x1", "x2", "where"])

0 commit comments

Comments
 (0)
0