-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Numpydoc-ify various functions #17752
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
Conversation
lib/matplotlib/dates.py
Outdated
`~datetime.datetime.strftime` format string. | ||
Parameters | ||
---------- | ||
t: |
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.
no colon (same below)
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.
Added types instead.
lib/matplotlib/sankey.py
Outdated
=============== ========================================== | ||
Other Parameters | ||
---------------- | ||
quadrant : int, {0, 1, 2, 3} |
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.
I guess the only acceptable values are 0, 1, 2, 3, not any int.
(Also perhaps state the defaults.)
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.
I'm not really sure what 0, 1, 2, 3 mean, and I'm getting the feeling the optimization is not really worth it and we should just replace this function with Path.arc
... But that would be a separate PR.
lib/matplotlib/legend.py
Outdated
@@ -1079,8 +1090,9 @@ def set_draggable(self, state, use_blit=False, update='loc'): | |||
|
|||
Returns | |||
------- | |||
If *state* is ``True`` this returns the `~.DraggableLegend` helper | |||
instance. Otherwise this returns ``None``. | |||
`~.DraggableLegend` or *None* |
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.
`~.DraggableLegend` or *None* | |
`.DraggableLegend` or *None* |
~ shortens the given name to the last part. Since we only have one part here anyway, ~does not have any effect and it's more readable to leave it out.
lib/matplotlib/legend.py
Outdated
If *state* is ``True`` this returns the `~.DraggableLegend` helper | ||
instance. Otherwise this returns ``None``. | ||
`~.DraggableLegend` or *None* | ||
If *state* is ``True`` this returns the `~.DraggableLegend` helper |
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.
If *state* is ``True`` this returns the `~.DraggableLegend` helper | |
If *state* is ``True`` this returns the `.DraggableLegend` helper |
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.
modulo @timhoffm 's suggestions.
Anyone can merge on green. |
…752-on-v3.3.x Backport PR #17752 on branch v3.3.x (Numpydoc-ify various functions)
PR Summary
Sorry, this is a bit all-over-the-place. I started this a long time ago, and in the interest of it not becoming further out of date, I decided to clean it up a bit and post it. Unfortunately, it's a bit of a hodge-podge of different things right now.
PR Checklist