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

ENH Better error message when providing wrong fontsizes #5025

Merged
merged 1 commit into from Sep 5, 2015
Merged

ENH Better error message when providing wrong fontsizes #5025

merged 1 commit into from Sep 5, 2015

Conversation

NelleV
Copy link
Member

@NelleV NelleV commented Sep 4, 2015

This is a very small PR, to print a better error message when we provide a wrong fontsize.

It now prints

normal is not a valid font size. Valid font sizes are xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger.

raise ValueError("%s is not a valid font size. Valid font sizes "
"are %s." % (s, ", ".join(fontsizes)))


validate_fontsizelist = _listify_validator(validate_fontsize)
Copy link
Member

Choose a reason for hiding this comment

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

PEP8 question... does the 2 blank line rule have to be right after the function, or can it wait until after ancillary actions like munging of docstrings and such?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't fix so, but I'm not sure.

@NelleV NelleV changed the title ENH Better error message when providing wrong fontsizes [MRG] ENH Better error message when providing wrong fontsizes Sep 5, 2015
tacaswell added a commit that referenced this pull request Sep 5, 2015
ENH: Better error message when providing wrong fontsizes
@tacaswell tacaswell merged commit e8e75eb into matplotlib:master Sep 5, 2015
@QuLogic QuLogic changed the title [MRG] ENH Better error message when providing wrong fontsizes ENH Better error message when providing wrong fontsizes Dec 7, 2016
@QuLogic QuLogic added this to the v1.5.0 milestone Dec 7, 2016
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

4 participants