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

Skip to content

Commit dc3f061

Browse files
committed
Merge pull request #5915 from tacaswell/mnt_clarify_deprecation
DOC: add function name to deprecation warning
2 parents cd866e9 + a11fb24 commit dc3f061

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/matplotlib/artist.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ def set_axes(self, axes):
207207
208208
ACCEPTS: an :class:`~matplotlib.axes.Axes` instance
209209
"""
210-
warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
210+
warnings.warn(_get_axes_msg.format('set_axes'), mplDeprecation,
211+
stacklevel=1)
211212
self.axes = axes
212213

213214
def get_axes(self):
@@ -218,7 +219,8 @@ def get_axes(self):
218219
This has been deprecated in mpl 1.5, please use the
219220
axes property. Will be removed in 1.7 or 2.0.
220221
"""
221-
warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
222+
warnings.warn(_get_axes_msg.format('get_axes'), mplDeprecation,
223+
stacklevel=1)
222224
return self.axes
223225

224226
@property
@@ -1480,5 +1482,5 @@ def kwdoc(a):
14801482

14811483
docstring.interpd.update(Artist=kwdoc(Artist))
14821484

1483-
_get_axes_msg = """This has been deprecated in mpl 1.5, please use the
1485+
_get_axes_msg = """{} has been deprecated in mpl 1.5, please use the
14841486
axes property. A removal date has not been set."""

0 commit comments

Comments
 (0)