8000 Merge pull request #11224 from dstansby/fancyarrowkwargs · matplotlib/matplotlib@932fd81 · GitHub
[go: up one dir, main page]

Skip to content

Commit 932fd81

Browse files
authored
Merge pull request #11224 from dstansby/fancyarrowkwargs
Add deprecation messages for unused kwargs in FancyArrowPatch
2 parents bfa8d61 + 2cdb484 commit 932fd81

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

lib/matplotlib/cbook/deprecation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def warn_deprecated(
100100
"""
101101
message = _generate_deprecation_message(
102102
since, message, name, alternative, pending, obj_type, removal=removal)
103+
message = '\n' + message
103104
warnings.warn(message, mplDeprecation, stacklevel=2)
104105

105106

lib/matplotlib/patches.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3973,6 +3973,20 @@ def __init__(self, posA=None, posB=None,
39733973
Valid kwargs are:
39743974
%(Patch)s
39753975
"""
3976+
if arrow_transmuter is not None:
3977+
cbook.warn_deprecated(
3978+
3.0,
3979+
message=('The "arrow_transmuter" keyword argument is not used,'
3980+
' and will be removed in Matplotlib 3.1'),
3981+
name='arrow_transmuter',
3982+
obj_type='keyword argument')
3983+
if connector is not None:
3984+
cbook.warn_deprecated(
3985+
3.0,
3986+
message=('The "connector" keyword argument is not used,'
3987+
' and will be removed in Matplotlib 3.1'),
3988+
name='connector',
3989+
obj_type='keyword argument')
39763990
Patch.__init__(self, **kwargs)
39773991

39783992
if posA is not None and posB is not None and path is None:

0 commit comments

Comments
 (0)
0