X Tutup
Skip to content

Be more correct when validating bbox rc params#4647

Merged
jenshnielsen merged 3 commits intomatplotlib:masterfrom
WeatherGod:validate_bbox_fix
Jul 12, 2015
Merged

Be more correct when validating bbox rc params#4647
jenshnielsen merged 3 commits intomatplotlib:masterfrom
WeatherGod:validate_bbox_fix

Conversation

@WeatherGod
Copy link
Copy Markdown
Member

right now, validate_bbox would let non strings validate as correct when that isn't the case. Also use the 'standard' name instead of None for the parameter.

@WeatherGod WeatherGod added this to the next point release milestone Jul 12, 2015
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you explain why this is needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because the object from an rcfile can't be a None object, only the string. There is only one situation that I can find where it is valid to say None in the rc file and mean the object and one situation where it is valid to say None/none in the rc file and mean the string or possibly the object (the default interpolation mode). This takes care of the former situation. We probably should double-check how we are handling the latter.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, I would suggest adding a comment explaining that

@WeatherGod
Copy link
Copy Markdown
Member Author

Just pushed up comments and docstring tweaks. By the way, validation of image.interpolation is just against six.text_type as opposed to a string list of possible values. And no support for specifying None interpolation as opposed to 'none' interpolation. Don't know if we want to go down that rabbit hole here.

@jenshnielsen
Copy link
Copy Markdown
Member

@WeatherGod Thanks, can you open an issue on the interpolation issue?

jenshnielsen added a commit that referenced this pull request Jul 12, 2015
Be more correct when validating bbox rc params
@jenshnielsen jenshnielsen merged commit e405a68 into matplotlib:master Jul 12, 2015
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.

3 participants

X Tutup