Skip to content

DOC: add function name to deprecation warning #5915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ def set_axes(self, axes):

ACCEPTS: an :class:`~matplotlib.axes.Axes` instance
"""
warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
warnings.warn(_get_axes_msg.format('set_axes'), mplDeprecation,
stacklevel=1)
self.axes = axes

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

@property
Expand Down Expand Up @@ -1480,5 +1482,5 @@ def kwdoc(a):

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

_get_axes_msg = """This has been deprecated in mpl 1.5, please use the
_get_axes_msg = """{} has been deprecated in mpl 1.5, please use the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'{}' can't be used in v1.5.x branch.

axes property. A removal date has not been set."""