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

Skip to content

Commit c44b7dd

Browse files
committed
MNT: put wrapping doc at end of docstring
1 parent f9ace37 commit c44b7dd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/matplotlib/pyplot.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ def uninstall_repl_displayhook():
193193
draw_all = _pylab_helpers.Gcf.draw_all
194194

195195
_ENSURE_AX_DOC = """
196+
196197
This function has been decorated by pyplot to have
197198
an implicit reference to the `plt.gca()` passed as the first argument.
198199
@@ -206,6 +207,7 @@ def uninstall_repl_displayhook():
206207

207208

208209
_ENSURE_AX_NEW_DOC = """
210+
209211
This function has been decorated by pyplot to create a new
210212
axes if one is not explicitly passed.
211213
@@ -265,7 +267,7 @@ def inner(*args, **kwargs):
265267
pre_doc = ''
266268
else:
267269
pre_doc = dedent(pre_doc)
268-
inner.__doc__ = _ENSURE_AX_DOC.format(func=func.__name__, obj='') + pre_doc
270+
inner.__doc__ = pre_doc + _ENSURE_AX_DOC.format(func=func.__name__, obj='')
269271

270272
return inner
271273

@@ -292,8 +294,8 @@ def inner(*args, **kwargs):
292294
pre_doc = ''
293295
else:
294296
pre_doc = dedent(pre_doc)
295-
inner.__doc__ = (_ENSURE_AX_NEW_DOC.format(func=func.__name__, obj='') +
296-
pre_doc)
297+
inner.__doc__ = (pre_doc +
298+
_ENSURE_AX_NEW_DOC.format(func=func.__name__, obj=''))
297299

298300
return inner
299301

@@ -326,8 +328,8 @@ def inner(*args, **kwargs):
326328
pre_doc = ''
327329
else:
328330
pre_doc = dedent(pre_doc)
329-
inner.__doc__ = _ENSURE_AX_DOC.format(func=func.__name__,
330-
obj='obj.') + pre_doc
331+
inner.__doc__ = pre_doc + _ENSURE_AX_DOC.format(func=func.__name__,
332+
obj='obj.')
331333
return inner
332334

333335

0 commit comments

Comments
 (0)