8000 Merge pull request #11643 from anntzer/deprecationmessages · matplotlib/matplotlib@b52a284 · GitHub
[go: up one dir, main page]

Skip to content

Commit b52a284

Browse files
authored
Merge pull request #11643 from anntzer/deprecationmessages
Fix deprecation messages.
2 parents 8c99daf + b97cd2d commit b52a284

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

lib/matplotlib/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,11 +862,11 @@ def __setitem__(self, key, val):
862862
"either import that binding first, or set the QT_API "
863863
"environment variable.")
864864
cbook.warn_deprecated(
865-
"2.2", key, obj_type="rcparam", addendum=addendum)
865+
"2.2", name=key, obj_type="rcparam", addendum=addendum)
866866
elif key in _deprecated_ignore_map:
867867
version, alt_key = _deprecated_ignore_map[key]
868868
cbook.warn_deprecated(
869-
version, key, obj_type="rcparam", alternative=alt_key)
869+
version, name=key, obj_type="rcparam", alternative=alt_key)
870870
return
871871
elif key == 'examples.directory':
872872
cbook.warn_deprecated(

lib/matplotlib/cbook/deprecation.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ def _generate_deprecation_message(
4646
+ (" Use %(alternative)s instead." if alternative else "")
4747
+ (" %(addendum)s" if addendum else ""))
4848

49-
return (
50-
message % dict(func=name, name=name, obj_type=obj_type, since=since,
51-
removal=removal, alternative=alternative)
52-
+ addendum)
49+
return message % dict(
50+
func=name, name=name, obj_type=obj_type, since=since, removal=removal,
51+
alternative=alternative, addendum=addendum)
5352

5453

5554
def warn_deprecated(

0 commit comments

Comments
 (0)
0