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

Skip to content

Commit 1be4eab

Browse files
authored
Merge pull request #9097 from anntzer/string_types
MNT: Validate string rcParams with string_types, not text_types.
2 parents 54adb36 + 73f7525 commit 1be4eab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/rcsetup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def validate_color_for_prop_cycle(s):
353353
if match is not None:
354354
raise ValueError('Can not put cycle reference ({cn!r}) in '
355355
'prop_cycler'.format(cn=s))
356-
elif isinstance(s, six.text_type):
356+
elif isinstance(s, six.string_types):
357357
match = re.match('^C[0-9]$', s)
358358
if match is not None:
359359
raise ValueError('Can not put cycle reference ({cn!r}) in '
@@ -855,7 +855,7 @@ def validate_cycler(s):
855855

856856

857857
def validate_hist_bins(s):
858-
if isinstance(s, six.text_type) and s == 'auto':
858+
if isinstance(s, six.string_types) and s == 'auto':
859859
return s
860860
try:
861861
return int(s)
@@ -874,7 +874,7 @@ def validate_animation_writer_path(p):
874874
# Make sure it's a string and then figure out if the animations
875875
# are already loaded and reset the writers (which will validate
876876
# the path on next call)
877-
if not isinstance(p, six.text_type):
877+
if not isinstance(p, six.string_types):
878878
raise ValueError("path must be a (unicode) string")
879879
from sys import modules
880880
# set dirty, so that the next call to the registry will re-evaluate

0 commit comments

Comments
 (0)