10000 Shorten some docstrings. by anntzer · Pull Request #12625 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Shorten some docstrings. #12625

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
Oct 26, 2018
Merged

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented Oct 25, 2018
  • Remove the explicit :class: annotation (which isn't necessary).
  • Make docstrings of all Axes.add_foo methods consistent among
    themselves: a) having a separate Parameters/Returns section for each
    of them seems completely overkill; b) most (all?) of them set the
    clip_path and the transform on the added artist, so the snippet to
    that effect that was present in add_patch should be added to either
    all or none of the methods.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Copy link
Member
@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Some minor comments.

:class:`~matplotlib.ticker.ScalarFormatter` is not the
:class:`~matplotlib.ticker.Formatter` being used, an
If the method is called when the `~matplotlib.ticker.ScalarFormatter`
is not the `~matplotlib.ticker.Formatter` being used, an
:exc:`AttributeError` will be raised.
Copy link
Member

Choose a reason for hiding this comment

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

prefix can be omitted as well.

@@ -3680,7 +3634,7 @@ def xaxis_date(self, tz=None):

Parameters
----------
tz : string or :class:`tzinfo` instance, optional
tz : string or `tzinfo` instance, optional
Timezone string or timezone. Defaults to rc value.
Copy link
Member

Choose a reason for hiding this comment

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

use :rc: directive

@@ -3693,7 +3647,7 @@ def yaxis_date(self, tz=None):

Parameters
----------
tz : string or :class:`tzinfo` instance, optional
tz : string or `tzinfo` instance, optional
Timezone string or timezone. Defaults to rc value.
Copy link
Member

Choose a reason for hiding this comment

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

use :rc: directive

- Remove the explicit :class: annotation (which isn't necessary).
- Make docstrings of all Axes.add_foo methods consistent among
  themselves: a) having a separate Parameters/Returns section for each
  of them seems completely overkill; b) most (all?) of them set the
  clip_path and the transform on the added artist, so the snippet to
  that effect that was present in add_patch should be added to either
  all or none of the methods.
@anntzer
Copy link
Contributor Author
anntzer commented Oct 26, 2018

all comments handled

@jklymak jklymak added this to the v3.1 milestone Oct 26, 2018
@jklymak jklymak merged commit de3c5fb into matplotlib:master Oct 26, 2018
@anntzer anntzer deleted the short-docstrings branch October 27, 2018 08:59
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.

3 participants
0