-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Less ACCEPTS, more numpydoc. #12229
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
Less ACCEPTS, more numpydoc. #12229
Conversation
instances. Use *kwarg* *minor=True* to select minor ticks. | ||
All other kwargs are used to update the text object properties. | ||
As for get_ticklabels, label1 (left or bottom) is | ||
affected for a given tick only if its label1On attribute |
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.
This is simply not true: we update all ticks regardless of visibility.
lib/matplotlib/axis.py
Outdated
labels. | ||
minor : bool | ||
If True, set minor ticks instead of major ticks. | ||
**kwargs : |
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 needed if you don't specify a type.
lib/matplotlib/axis.py
Outdated
""" | ||
Returns | ||
------- | ||
List of visible `Text`\s. For each tick, includes ``tick.label1`` if |
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.
numpydoc requires Returns to be formatted like Parameters. Do something like
Returns
-------
labels
List of visible `Text`\s. For each tick, includes ``tick.label1`` if
it is visible, then ``tick.label2`` if it is visible, in that order.
comments handled |
ef91628
to
c8bc106
Compare
lib/matplotlib/artist.py
Outdated
match = re.search("(?m)^ *{} : (.+)".format(param_name), docstring) | ||
# We could set the number of * based on whether the parameter is a | ||
# var(kw)args but it's not really worth the complexity. | ||
match = re.search("(?m)^ *\*{{0,2}}{} : (.+)".format(param_name), |
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.
why did this regexp change?
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.
The change is \*{{0,2}}
to support parsing
*margins : float, optional
and potentially also **kwargs : type
(though I don't know if we have such a case. See also the added test.
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 just realized that this can never be **kwargs
(because the setter passes the argument positionally), so I replaced it to only support a single *
.
c8bc106
to
50fc4c8
Compare
PR Summary
All's in the title.
PR Checklist