benchmark icon indicating copy to clipboard operation
benchmark copied to clipboard

[*.py] Rename "Arguments:" to "Args:"

Open SamuelMarks opened this issue 5 years ago • 0 comments

I've written custom parsers and emitters for everything from docstrings to classes and functions. However, I recently came across an issue when I was parsing/generating from the TensorFlow—and now PyTorch—codebases: inconsistent use of Args: and Arguments: in its docstrings. It is easy enough to extend my parsers to support both variants, however it looks like Arguments: is wrong anyway, as per:

  • https://google.github.io/styleguide/pyguide.html#doc-function-args @ ddccc0f

  • https://chromium.googlesource.com/chromiumos/docs/+/master/styleguide/python.md#describing-arguments-in-docstrings @ 9fc0fc0

  • https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html @ c0ae8e3

Therefore, only Args: is valid. This PR replaces them throughout the codebase.

PS: For related PRs, see pytorch/pytorch/pull/49736

SamuelMarks avatar Dec 22 '20 12:12 SamuelMarks