8000 Fix incorrect calls to warn_deprecated. by anntzer · Pull Request #15245 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix incorrect calls to warn_deprecated. #15245

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
Sep 11, 2019
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,11 +1167,11 @@ def remove_callback(self, func, *args, **kwargs):
"""
if args or kwargs:
cbook.warn_deprecated(
"3.1", "In a future version, Timer.remove_callback will not "
"take *args, **kwargs anymore, but remove all callbacks where "
"the callable matches; to keep a specific callback removable "
"by itself, pass it to add_callback as a functools.partial "
"object.")
"3.1", message="In a future version, Timer.remove_callback "
"will not take *args, **kwargs anymore, but remove all "
"callbacks where the callable matches; to keep a specific "
"callback removable by itself, pass it to add_callback as a "
"functools.partial object.")
self.callbacks.remove((func, args, kwargs))
else:
funcs = [c[0] for c in self.callbacks]
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ def __init__(self, s, loc, pad=0.4, borderpad=0.5, prop=None, **kwargs):
cbook.warn_deprecated(
"3.1", message="Mixing horizontalalignment or "
"verticalalignment with AnchoredText is not supported, "
"deprecated since %(version)s, and will raise an exception "
"deprecated since %(since)s, and will raise an exception "
"%(removal)s.")

self.txt = TextArea(s, textprops=prop, minimumdescent=False)
Expand Down
3 changes: 2 additions & 1 deletion lib/mpl_toolkits/axisartist/grid_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def _deprecate_factor_none(factor):
# removed.
if factor is None:
cbook.warn_deprecated(
"3.2", "factor=None is deprecated; use/return factor=1 instead")
"3.2",
message="factor=None is deprecated; use/return factor=1 instead")
factor = 1
return factor

Expand Down
0