Skip to content
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

Fix AttrituteError for .lower on tuple of strings #1427

Merged
merged 1 commit into from Oct 23, 2012

Conversation

dmcdougall
Copy link
Member

Fixes #1424.

@dmcdougall
Copy link
Member Author

I'd like to get this in before the cut.

@pelson You're awake. Does this solution look reasonable to you?

if is_string_like(ec):
ec = ec.lower()
elif is_sequence_of_strings(ec):
ec = [a.lower() for a in ec]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this line exists? Initial testing suggests colour names are case insensitive. Does it fix anything?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, if colour names are case insensitive then it's unneeded. Thanks for pointing that out.

@pelson
Copy link
Member

pelson commented Oct 23, 2012

@pelson You're awake. Does this solution look reasonable to you?

Morning! This looks like the correct approach, so I am confident we can get this into the RC today... we might just need a small tweak.

@dmcdougall
Copy link
Member Author

@pelson Thanks. Your suggestion was an improvement.

if 'antialiaseds' not in kwargs and ec.lower() == "none":
kwargs['antialiaseds'] = False
if 'antialiaseds' not in kwargs and (is_string_like(ec) and
ec == "none"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've missed the .lower part here. Other than that, I'm more than happy to press the big green button 😄

@dmcdougall
Copy link
Member Author

@pelson Eyes like a hawk. Sorted now. Cheers.

pelson added a commit that referenced this pull request Oct 23, 2012
Fix AttrituteError for .lower on tuple of strings
@pelson pelson merged commit a3459a2 into matplotlib:v1.2.x Oct 23, 2012
@pelson
Copy link
Member

pelson commented Oct 23, 2012

Merged. Good stuff. Thanks @dmcdougall!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants