File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 14
14
"""
15
15
16
16
import ast
17
- import numbers
18
17
from functools import lru_cache , reduce
19
18
from numbers import Real
20
19
import operator
@@ -730,7 +729,7 @@ def visit_Attribute(self, node):
730
729
ignorecase = True )
731
730
732
731
733
- def validate_legend_loc (loc ):
732
+ def _validate_legend_loc (loc ):
734
733
"""
735
734
Confirm that loc is a type which rc.Params["legend.loc"] supports.
736
735
@@ -759,8 +758,7 @@ def validate_legend_loc(loc):
759
758
if 0 <= loc <= 10 :
760
759
return loc
761
760
if isinstance (loc , tuple ):
762
- if len (loc ) == 2 \
763
- and all (isinstance (e , numbers .Real ) for e in loc ):
761
+ if len (loc ) == 2 and all (isinstance (e , Real ) for e in loc ):
764
762
return loc
765
763
raise ValueError (f"{ loc } is not a valid legend location." )
766
764
@@ -1089,7 +1087,7 @@ def _convert_validator_spec(key, conv):
1089
1087
1090
1088
# legend properties
1091
1089
"legend.fancybox" : validate_bool ,
1092
- "legend.loc" : validate_legend_loc ,
1090
+ "legend.loc" : _validate_legend_loc ,
1093
1091
1094
1092
# the number of points in the legend line
1095
1093
"legend.numpoints" : validate_int ,
You can’t perform that action at this time.
0 commit comments