Fix up docstrings in rbtools/clients/
Review Request #9884 — Created April 21, 2018 and submitted
This change fixes up all the docstrings for the various clients to match
our modern style, and to be consistent across the different tools. Whew.
- Ran unit tests.
- Ran pydocstyle.
Description | From | Last Updated |
---|---|---|
, optional |
chipx86 | |
, optional |
chipx86 | |
"Return" |
chipx86 | |
"command line" is more common these days than "command-line". I only see "command-line" in terms of "command-line interface," but even … |
chipx86 | |
We don't need to say "The 'revisions' argument" here. |
chipx86 | |
Let's use double backticks for the examples. |
chipx86 | |
This will parse wrong, due to the indentation. In other places we do: A dictionary with the following keys: ``base`` … |
chipx86 | |
I don't think we want to reference git here. |
chipx86 | |
We should probably document these. Certainly which are required and which are not. Also, it mentions commit_id but that's not … |
chipx86 | |
:command: for patch |
chipx86 | |
"filenames" |
chipx86 | |
Can you make the patch -pX a literal? |
chipx86 | |
I had to look up how this was actually provided. At first I thought a dictionary, but then I saw … |
chipx86 | |
, optional |
chipx86 | |
, optional |
chipx86 | |
Maybe reference parse_revision_spec here? |
chipx86 | |
Same note as above with the author info. |
chipx86 | |
Let's get rid of "RB" here. Nothing else really references that. |
chipx86 | |
This isn't showing as optional in the function parameters. |
chipx86 | |
These all need , optional |
chipx86 | |
"Return" |
chipx86 | |
This isn't optional in the function parameters. |
chipx86 | |
"Windows" |
chipx86 | |
"ClearCase" |
chipx86 | |
I don't know how this is going to look, but it's probably not going to be a suitable list. Can … |
chipx86 | |
Can you fix the missing space in this comment while here, and change to "ClearCase"? |
chipx86 | |
"Return" |
chipx86 | |
Mind changing this while here to not override _? I feel like this is going to bite us someday. A … |
chipx86 | |
This can be a list as well. |
chipx86 | |
Extra space before the ending paren. |
chipx86 | |
, optional |
chipx86 | |
"Return" |
chipx86 | |
Missing the full module path. |
chipx86 | |
Is this a SHA? |
chipx86 | |
, optional |
chipx86 | |
Can you make the tuple example a literal? |
chipx86 | |
list of unicode? |
chipx86 | |
This isn't listed as optional in the function params. |
chipx86 | |
"Perforce" |
chipx86 | |
"Perforce" |
chipx86 | |
Can you use literals for these? |
chipx86 | |
"Perforce" |
chipx86 | |
"Can you use a literal here?" |
chipx86 | |
Missing a type and , optional |
chipx86 | |
Missing a period. |
chipx86 | |
"Perforce" |
chipx86 | |
, optional |
chipx86 | |
, optional |
chipx86 | |
"Return" |
chipx86 | |
"URL" |
chipx86 | |
Can you use literals for the quoted bits? Also, "URL". |
chipx86 | |
"URLs" |
chipx86 | |
"extraction" |
chipx86 | |
"extraction" |
chipx86 | |
"extraction" |
chipx86 | |
"extraction" |
chipx86 | |
"exclude_patterns" isn't documented. |
chipx86 | |
Missing a name. |
chipx86 | |
These should probably be like: ``//path/to/file`` Description... ``//path/to/dir...``` Description... |
chipx86 | |
This isn't optional in the function params. |
chipx86 | |
"Perforce" |
chipx86 | |
"Return" |
chipx86 | |
This should probably be removed. |
chipx86 | |
"Return" |
chipx86 | |
These aren't optional in the function params. |
chipx86 | |
We shouldn't use "r". Instead, we need to fix the example. |
chipx86 | |
The example diffs should all be indented 4 spaces with a blank line on either side, to turn them into … |
chipx86 | |
:command: |
chipx86 | |
This isn't optional in the function params. |
chipx86 | |
We can nix "RB", or change it to "Review Board." |
chipx86 | |
E501 line too long (80 > 79 characters) |
reviewbot | |
We should use :command: here as well. |
chipx86 | |
:py:meth: |
chipx86 | |
rbtools.clients.errors.MergeError |
chipx86 | |
rbtools.clients.errors.PushError |
chipx86 | |
rbtools.clients.errors.AmendError |
chipx86 | |
Missing a "Returns." |
chipx86 | |
, optional |
chipx86 | |
:command: around "cleartool"? |
chipx86 | |
Can we rewrite this? It's not clear. Maybe something like: This will split a version path, pulling out the branch … |
chipx86 | |
Like above, this wording isn't ideal. How about: """Construct an extended path from a file path and version identifier. This … |
chipx86 | |
How about "Construct a revisioned path from a branch path and version identifier." |
chipx86 | |
How about "Return extended paths for all modifications in a changeset." |
chipx86 | |
Can we make this a bit more English-sounding? |
chipx86 | |
Can we use :command: around "cleartool lsX"? |
chipx86 | |
We should use :command: for "cvs diff". |
chipx86 | |
Can we make the refs/heads/ a literal? |
chipx86 | |
:command: for "git config" |
chipx86 | |
:command: for "svn diff". |
chipx86 | |
Let's use :command: around git-svn and git-p4. |
chipx86 | |
:command: here as well. |
chipx86 | |
And on these. |
chipx86 | |
rbtools.clients.errors.AmendError |
chipx86 | |
Let's use :envvar around $EDITOR. |
chipx86 | |
rbtools.clients.errors.MergeError |
chipx86 | |
rbtools.clients.errors.PushError |
chipx86 | |
This should specify that None will be returned if the path could not be found. |
chipx86 | |
Let's use :command: around "p4 info". |
chipx86 | |
:command: around "p4" |
chipx86 | |
:command: around "p4" |
chipx86 | |
:command: around "p4" |
chipx86 | |
Should be "Returns" and then "Raises" |
chipx86 | |
"Returns" and then "Raises" |
chipx86 | |
"Returns" and then "Raises" |
chipx86 | |
"Returns" and then "Raises" |
chipx86 | |
The - should be a _ |
chipx86 | |
rbtools.clients.errors.AmendError |
chipx86 | |
Need a double :: in the preceding paragraphs, or this will appear as quoted text (for like e-mails and such). |
chipx86 | |
"Returns" and then "Raises" |
chipx86 | |
If you are running flake8 with the flake8-docstrings package, we should be able to have these both in flake8.ignore. |
brennie |
-
-
-
-
-
"command line" is more common these days than "command-line". I only see "command-line" in terms of "command-line interface," but even the articles with that use "command line" in other contexts.
-
-
-
This will parse wrong, due to the indentation. In other places we do:
A dictionary with the following keys: ``base`` (:py:class:`unicode`): A revision ... ``tip`` (:py:class:`unicode`): ...
-
-
We should probably document these. Certainly which are required and which are not.
Also, it mentions
commit_id
but that's not included in the return statement. -
-
-
-
I had to look up how this was actually provided. At first I thought a dictionary, but then I saw that
review_request.get_submitter()
was passed in. Maybe we should just make this take a dictionary withfullname
andemail
keys and change the one call site? -
-
-
-
-
-
-
-
-
-
-
-
-
I don't know how this is going to look, but it's probably not going to be a suitable list. Can you fix this up?
-
-
-
Mind changing this while here to not override
_
? I feel like this is going to bite us someday. A[0]
should be sufficient. -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
These should probably be like:
``//path/to/file`` Description... ``//path/to/dir...``` Description...
-
-
-
-
-
-
-
-
The example diffs should all be indented 4 spaces with a blank line on either side, to turn them into code blocks. The "\n" will be retained.
-
-
-
- Commit:
-
79a07421e81c1210409753439cc3efea58ffaf6272549ac3ad680f24183eea4cce0e7c921cb566a9
Checks run (2 succeeded)
-
A few wording suggestions for ClearCase, a sprinkling of ReST roles (like
:command:
), and fixes for bad error class paths. Mostly pretty trivial things. -
-
-
-
-
Not something that needs to be addressed in this change, but we have different parameter names in different methods for this same type of argument. We should fix that.
-
-
-
-
-
Can we rewrite this? It's not clear. Maybe something like:
This will split a version path, pulling out the branch and version. A special version value of ``CHECKEDOUT`` represents the latest version of a file, similar to ``HEAD`` in many other types of repositories.
-
Like above, this wording isn't ideal. How about:
"""Construct an extended path from a file path and version identifier. This will construct a path in the form of ``path@version``. If the version is the special value ``CHECKEDOUT``, only the path will be returned. ... """
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Need a double
::
in the preceding paragraphs, or this will appear as quoted text (for like e-mails and such). -
- Commit:
-
72549ac3ad680f24183eea4cce0e7c921cb566a915e7b722dda59bc5886be1245b9537c6d00f804c