Skip to content

Argument checking for grid() #11784

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 20, 2018
Merged

Argument checking for grid() #11784

merged 1 commit into from
Aug 20, 2018

Conversation

timhoffm
Copy link
Member

PR Summary

Follow up to issues mentioned in #11760.

@@ -1438,9 +1438,17 @@ def grid(self, b=None, which='major', **kwargs):

"""
if len(kwargs):
if not b and b is not None: # something not-None falsey
warnings.warn('First parameter to grid() is falsey, but line '
Copy link
Member

Choose a reason for hiding this comment

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

Do you just mean 'False'? "falsey" is not something I'm familiar with, though maybe you mean False-like?

b = True
which = which.lower()
if which not in ['major', 'minor', 'both']:
raise ValueError("The argument 'which' must be one of 'major, "
Copy link
Member

Choose a reason for hiding this comment

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

open quote: 'major'

@jklymak jklymak merged commit 0e7a5c3 into matplotlib:master Aug 20, 2018
@jklymak
Copy link
Member

jklymak commented Aug 20, 2018

Thanks @timhoffm !

@QuLogic QuLogic added this to the v3.1 milestone Aug 20, 2018
@timhoffm timhoffm deleted the axes-grid branch August 21, 2018 08:51
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.

4 participants