Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 7 commits into from
Jun 26, 2020
Merged

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Jun 25, 2020

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

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

`~datetime.datetime.strftime` format string.
Parameters
----------
t:
Copy link
Contributor

Choose a reason for hiding this comment

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

no colon (same below)

Copy link
Member Author

Choose a reason for hiding this comment

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

Added types instead.

=============== ==========================================
Other Parameters
----------------
quadrant : int, {0, 1, 2, 3}
Copy link
Contributor

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.)

Copy link
Member Author

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.

@@ -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*
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`~.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.

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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If *state* is ``True`` this returns the `~.DraggableLegend` helper
If *state* is ``True`` this returns the `.DraggableLegend` helper

Copy link
Member

@tacaswell tacaswell left a 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.

@tacaswell
Copy link
Member

Anyone can merge on green.

@timhoffm timhoffm added this to the v3.3.0 milestone Jun 26, 2020
@timhoffm timhoffm merged commit 224e451 into matplotlib:master Jun 26, 2020
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jun 26, 2020
@QuLogic QuLogic deleted the doc-normalize branch June 26, 2020 06:42
dstansby added a commit that referenced this pull request Jun 26, 2020
…752-on-v3.3.x

Backport PR #17752 on branch v3.3.x (Numpydoc-ify various functions)
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.

4 participants