-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Convert docstring of Axes.pie() into numpydoc #8357
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
There's a lot of extraneous whitespace changes here. While correcting this is not unwelcome, it makes it rather difficult to say what parts of this change are actually relevant. It would be better to have a separate PR for whitespace correction, or only do it on the parts that you are actually editing. Also, please write actual commit message, not just a single dot. |
This reverts commit ea9250d.
Converts the docstring of pie() function in _ axes.py into numpydoc
Added the changes you suggested. I removed all the whitespace fixing. Will create a separate issue for that later. And added the exact commit name. Sorry about previous mistake. |
Hmm, I should have been a bit clearer. It's not good to revert this because now there's a commit making the whitespace changes and another commit undoing those, and then if you open a separate PR, there'll be another commit fixing the whitespace again. If you know how to rebase, it would be a little better if you rebased and squashed these commits all into a single one. |
lib/matplotlib/axes/_axes.py
Outdated
|
||
*explode*: [ *None* | len(x) sequence ] | ||
explode: None or array |
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.
Add a space before the colon for all parameters.
lib/matplotlib/axes/_axes.py
Outdated
Draw a shadow beneath the pie. | ||
|
||
*startangle*: [ *None* | Offset angle ] | ||
startangle: None or Offset angle |
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.
Offset angle
is not a type; should be float
.
lib/matplotlib/axes/_axes.py
Outdated
|
||
*frame*: [ *False* | *True* ] | ||
Plot axes frame with the chart. | ||
center: list of int |
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.
Extra space. Also, why int
?
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.
My bad. Changing to float.
lib/matplotlib/axes/_axes.py
Outdated
ax = axes([0.1, 0.1, 0.8, 0.8]) | ||
Returns | ||
------- | ||
patches: list |
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.
Also add space before colon of every return value.
lib/matplotlib/axes/_axes.py
Outdated
axes(aspect=1) | ||
autotexts: list | ||
A is a list of :class:`~matplotlib.text.Text` instances for the | ||
numeric labels. Is returned only is if parameter *autopct* is |
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.
is if -> if
lib/matplotlib/axes/_axes.py
Outdated
A is a list of :class:`~matplotlib.text.Text` instances for the | ||
numeric labels. Is returned only is if parameter *autopct* is | ||
not *None*. If *autopct* is *None*, the tuple returned | ||
is (patches, texts). |
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.
Leave out this last sentence.
# Conflicts: # lib/matplotlib/tests/test_backend_pgf.py
from "as mtrans" into "as mtransforms"
Rather than closing over it and relying on it being defined in the top-level function namespace.
In cases were a filename is passed in we clean up the temporary file by renaming it to the output file, however if a file handle is passed in we copy the contents into that the file and do not clean up the temporary file. Use a try...finally block to always remove the temporary file, even if things go wrong.
In cases were a filename is passed in we clean up the temporary file by renaming it to the output file, however if a file handle is passed in we copy the contents into that the file and do not clean up the temporary file. Use a try...finally block to always remove the temporary file, even if things go wrong.
This reverts commit ea9250d.
Converts the docstring of pie() function in _ axes.py into numpydoc
# Conflicts: # lib/matplotlib/tests/test_backend_pgf.py
Added spacing between colons and made the changes pointed out
I tried rebasing and made a mistake. I ended up adding additional commits. I am trying to fix this and figure out the rebasing. Also made the changes suggested in: Made style changes and edits suggested (a0c7bd8) |
Shall I remove this PR and open a new PR with the changes you suggested? |
It looks like quite a few things have gone wrong with git here; if it would be easier for you to open a new PR, please feel free! |
@kahnchana I have cleaned up the commits to this branch locally. I'm closing this in favor of #8371 |
Reference Issue #8272
What does this implement/fix? Explain your changes.
The docstring of the function pie() in lib/matplotlib/axes/_axes.py has been converted to numpydoc format. Also, pep-8 style errors in the code have been fixed.