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

Skip to content

Commit 7ab75f5

Browse files
committed
Deprecate former validation schemes used by 'contour.negative_linestyle'
1 parent ad21964 commit 7ab75f5

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

lib/matplotlib/rcsetup.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import warnings
2626
import re
2727

28-
from matplotlib.cbook import mplDeprecation, ls_mapper
28+
from matplotlib.cbook import mplDeprecation, deprecated, ls_mapper
2929
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
3030
from matplotlib.colors import is_color_like
3131

@@ -530,11 +530,22 @@ def validate_ps_distiller(s):
530530
'top', 'none'])
531531
validate_fillstylelist = _listify_validator(validate_fillstyle)
532532

533-
validate_negative_linestyle = ValidateInStrings('negative_linestyle',
534-
['solid', 'dashed'],
535-
ignorecase=True)
533+
_validate_negative_linestyle = ValidateInStrings('negative_linestyle',
534+
['solid', 'dashed'],
535+
ignorecase=True)
536536

537537

538+
@deprecated('3.0.0?', pending=True,
539+
addendum=(" See 'validate_negative_linestyle_legacy' " +
540+
"deprecation warning for more information."))
541+
def validate_negative_linestyle(s):
542+
_validate_negative_linestyle(s)
543+
544+
545+
@deprecated('3.0.0?', pending=True,
546+
addendum=(" The 'contour.negative_linestyle' rcParam now " +
547+
"follows the same validation as the other rcParams " +
548+
"that are related to line style."))
538549
def validate_negative_linestyle_legacy(s):
539550
try:
540551
res = validate_negative_linestyle(s)

0 commit comments

Comments
 (0)