-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Docstring cleanup #14337
Docstring cleanup #14337
Conversation
lib/matplotlib/rcsetup.py
Outdated
@@ -237,8 +237,8 @@ def validate_int_or_None(s): | |||
|
|||
def validate_fonttype(s): | |||
""" | |||
confirm that this is a Postscript of PDF font type that we know how to | |||
convert to | |||
Confirm that this is a Postscript of PDF font type that we know how to |
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.
of -> or
lib/matplotlib/rcsetup.py
Outdated
@@ -305,7 +305,7 @@ def __init__(self, n=None, allow_none=False): | |||
self.allow_none = allow_none | |||
|
|||
def __call__(self, s): | |||
"""return a seq of n floats or raise""" | |||
"""Return a seq of n floats or raise.""" |
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.
a list of *n* floats
lib/matplotlib/rcsetup.py
Outdated
@@ -329,7 +329,7 @@ def __init__(self, n=None): | |||
self.n = n | |||
|
|||
def __call__(self, s): | |||
"""return a seq of n ints or raise""" | |||
"""Return a seq of n ints or raise.""" |
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.
a list of *n* ints
lib/matplotlib/rcsetup.py
Outdated
try: | ||
return int(s) | ||
except ValueError: | ||
raise ValueError('Could not convert "%s" to int' % s) | ||
|
||
|
||
def validate_int_or_None(s): | ||
"""if not None, tries to validate as an int""" | ||
"""If not None, tries to validate as an 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.
Should rewrite to "Convert ..." like its non-None version.
@@ -713,7 +713,7 @@ def _calc_offsets(appended_sizes, karray): | |||
|
|||
def new_locator(self, nx, nx1=None): | |||
""" | |||
returns a new locator | |||
Returns a new locator |
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.
Create
@@ -806,7 +806,7 @@ class VBoxDivider(HBoxDivider): | |||
|
|||
def new_locator(self, ny, ny1=None): | |||
""" | |||
returns a new locator | |||
Returns a new locator |
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.
Create
@@ -251,7 +251,7 @@ def pick(self, mouseevent): | |||
|
|||
def twinx(self, axes_class=None): | |||
""" | |||
create a twin of Axes for generating a plot with a sharex | |||
Create a twin of Axes for generating a plot with a sharex |
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.
s/sharex/shared/
@@ -309,7 +309,7 @@ def _remove_twiny(self, ax): | |||
|
|||
def twin(self, aux_trans=None, axes_class=None): | |||
""" | |||
create a twin of Axes for generating a plot with a sharex | |||
Create a twin of Axes for generating a plot with a sharex |
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.
Wait is this even right for twin
?
…337-on-v3.1.x Backport PR #14337 on branch v3.1.x (Docstring cleanup)
PR Summary
Some docstring cleanup. Mainly capitalization (pydocstyle D403).
There's much more to do, but I don't trust automatic regexp replacements here. Therefore, I'll take it slow and do bits at a time. With that I can do other small doc improvements on the go and the PR does not become too large to review.