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

Change documented "Optional" ScaleBase method to "Required" #3997

Merged
merged 1 commit into from Jan 19, 2015

Conversation

ndevenish
Copy link
Contributor

The matplotlib.scale.ScaleBase.set_default_locators_and_formatters method is documented as optional in subclasses, but throws a NotImplementedError - and is actually called on subclass instances, so is not optional.

This fixes the documentation to reflect this fact.

This is required, as the base class method raises NotImplementedError, so
being documented as "Optional" is misleading.
@tacaswell
Copy link
Member

Looks good to me.

It looks like this documentation was added in b80e228 by @mdboom to replace no docs.

@tacaswell
Copy link
Member

And the function set_default_locators_and_formatters is used in Axis._set_scale which is called from the __init__ method of Axis so for scales to be useful, they clearly do need this implemented.

tacaswell added a commit that referenced this pull request Jan 19, 2015
DOC : Change documented "Optional" ScaleBase method to "Required"
@tacaswell tacaswell merged commit 9408937 into matplotlib:master Jan 19, 2015
tacaswell added a commit that referenced this pull request Jan 19, 2015
DOC : Change documented "Optional" ScaleBase method to "Required"
@tacaswell
Copy link
Member

@ndevenish Thanks! Documentation PRs are always appreciated.

back-ported as 3ab5edb

@ndevenish ndevenish deleted the docfix branch January 19, 2015 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants