CLI¶
pydocstring CLI provides entrypoints for CLI commands
Currently only the pydocstring
command is supported
To use pydocstring from the command line you call pydocstring
with the source, and optionally
the position of the cursor within that source (defaults to the end).
Note that pydocstring doesn’t insert docstrings in place (yet), as it’s designed for editor integration. It prints out the generated docstring for the scope the given cursor position is in.
You may also want to provide the -f
flag with the formatter you want to use.
usage: pydocstring [-h] [-f {google,numpy,reST}] [--version] source [position]
positional arguments:
source Source code to process, or the path to a file
position Position of the cursor in the document, defaults to
the end. Row, then column
optional arguments:
-h, --help show this help message and exit
-f {google,numpy,reST}, --formatter {google,numpy,reST}
docstring formatter to use
--version show program's version number and exit