8000 Validate string rcParams with string_types, not text_types. by anntzer · Pull Request #9097 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Validate string rcParams with string_types, not text_types. #9097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def validate_color_for_prop_cycle(s):
if match is not None:
raise ValueError('Can not put cycle reference ({cn!r}) in '
'prop_cycler'.format(cn=s))
elif isinstance(s, six.text_type):
elif isinstance(s, six.string_types):
match = re.match('^C[0-9]$', s)
if match is not None:
raise ValueError('Can not put cycle reference ({cn!r}) in '
Expand Down Expand Up @@ -855,7 +855,7 @@ def validate_cycler(s):


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