-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Shorten some docstrings. #12625
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments.
lib/matplotlib/axes/_base.py
Outdated
: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. |
There was a problem hiding this comment.
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.
lib/matplotlib/axes/_base.py
Outdated
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use :rc:
directive
lib/matplotlib/axes/_base.py
Outdated
@@ -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. |
There was a problem hiding this comment.
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.
6ecd619
to
ff1be78
Compare
all comments handled |
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