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

Skip to content

Commit 2f796c4

Browse files
authored
Merge pull request #12736 from timhoffm/move-deprecation-message-down
Move deprecation note to end of docstring
2 parents bed61ee + 41917ef commit 2f796c4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/cbook/deprecation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,12 @@ def wrapper(*args, **kwargs):
245245
return func(*args, **kwargs)
246246

247247
old_doc = inspect.cleandoc(old_doc or '').strip('\n')
248+
248249
message = message.strip()
249-
new_doc = ('.. deprecated:: {since}\n'
250-
' {message}\n'
250+
new_doc = ('{old_doc}\n'
251251
'\n'
252-
'{old_doc}'
252+
'.. deprecated:: {since}\n'
253+
' {message}'
253254
.format(since=since, message=message, old_doc=old_doc))
254255
if not old_doc:
255256
# This is to prevent a spurious 'unexected unindent' warning from

0 commit comments

Comments
 (0)