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

Skip to content

Rcparam validation fix #3564

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 19 commits into from
Oct 14, 2014
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
BUG : validate_stringlist should drop empty strings
This is a minor api change, but I can't think of why one
would want to carry around empty strings.
  • Loading branch information
tacaswell committed Oct 1, 2014
commit 86029129361f0487d1d4b2ab0e35889b81e36ae5
4 changes: 2 additions & 2 deletions lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ def validate_colorlist(s):
def validate_stringlist(s):
'return a list'
if isinstance(s, six.string_types):
return [six.text_type(v.strip()) for v in s.split(',')]
return [six.text_type(v.strip()) for v in s.split(',') if v.strip()]
else:
assert type(s) in [list, tuple]
return [six.text_type(v) for v in s]
return [six.text_type(v) for v in s if v]


validate_orientation = ValidateInStrings(
Expand Down