@@ -139,6 +139,7 @@ def validate_bool(b):
139
139
raise ValueError ('Could not convert "%s" to bool' % b )
140
140
141
141
142
+ @cbook .deprecated ("3.3" )
142
143
def validate_bool_maybe_none (b ):
143
144
"""Convert b to ``bool`` or raise, passing through *None*."""
144
145
if isinstance (b , str ):
@@ -663,7 +664,13 @@ def validate_markevery(s):
663
664
'svg.fonttype' , ['none' , 'path' ], _deprecated_since = "3.3" )
664
665
665
666
667
+ @cbook .deprecated ("3.3" )
666
668
def validate_hinting (s ):
669
+ return _validate_hinting (s )
670
+
671
+
672
+ # Replace by plain list in _prop_validators after deprecation period.
673
+ def _validate_hinting (s ):
667
674
if s in (True , False ):
668
675
cbook .warn_deprecated (
669
676
"3.2" , message = "Support for setting the text.hinting rcParam to "
@@ -680,6 +687,7 @@ def validate_hinting(s):
680
687
_deprecated_since = "3.3" )
681
688
682
689
690
+ @cbook .deprecated ("3.3" )
683
691
def validate_movie_writer (s ):
684
692
# writers.list() would only list actually available writers, but
685
693
# FFMpeg.isAvailable is slow and not worth paying for at every import.
@@ -1147,7 +1155,7 @@ def _convert_validator_spec(key, conv):
1147
1155
'text.usetex' : [False , validate_bool ],
1148
1156
'text.latex.preamble' : ['' , _validate_tex_preamble ],
1149
1157
'text.latex.preview' : [False , validate_bool ],
1150
- 'text.hinting' : ['auto' , validate_hinting ],
1158
+ 'text.hinting' : ['auto' , _validate_hinting ],
1151
1159
'text.hinting_factor' : [8 , validate_int ],
1152
1160
'text.kerning_factor' : [0 , validate_int ],
1153
1161
'text.antialiased' : [True , validate_bool ],
@@ -1467,7 +1475,7 @@ def _convert_validator_spec(key, conv):
1467
1475
# Limit, in MB, of size of base64 encoded animation in HTML
1468
1476
# (i.e. IPython notebook)
1469
1477
'animation.embed_limit' : [20 , validate_float ],
1470
- 'animation.writer' : ['ffmpeg' , validate_movie_writer ],
1478
+ 'animation.writer' : ['ffmpeg' , validate_string ],
1471
1479
'animation.codec' : ['h264' , validate_string ],
1472
1480
'animation.bitrate' : [- 1 , validate_int ],
1473
1481
# Controls image format when frames are written to disk
0 commit comments