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

Skip to content

Commit 4387660

Browse files
committed
split dependency check from option validation of usetex
svn path=/trunk/matplotlib/; revision=3429
1 parent d0186fc commit 4387660

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,8 @@ def checkdep_ps_distiller(s):
677677
else:
678678
return False
679679

680-
def validate_usetex(s):
681-
if not validate_bool(s):
680+
def checkdep_usetex(s):
681+
if not s:
682682
return False
683683

684684
tex_req = '3.1415'
@@ -807,7 +807,7 @@ def __call__(self, s):
807807

808808
# text props
809809
'text.color' : ['k', validate_color], # black
810-
'text.usetex' : [False, validate_usetex],
810+
'text.usetex' : [False, validate_bool],
811811
'text.latex.unicode': [False, validate_bool],
812812
'text.latex.preamble': ['', validate_latex_preamble],
813813
'text.dvipnghack' : [False, validate_bool],
@@ -1074,6 +1074,7 @@ def rc_params(fail_on_error=False):
10741074
rcParamsDefault = dict(rcParams.items()) # a copy
10751075

10761076
rcParams['ps.usedistiller'] = checkdep_ps_distiller(rcParams['ps.usedistiller'])
1077+
rcParams['text.usetex'] = checkdep_usetex(rcParams['text.usetex'])
10771078

10781079
def rc(group, **kwargs):
10791080
"""

0 commit comments

Comments
 (0)