Skip to content
Prev Previous commit
Next Next commit
removed tabs
  • Loading branch information
suhearsawho committed Feb 24, 2019
commit 95984c356e9128b6c33271b650dfd9bc9268ff85
4 changes: 2 additions & 2 deletions Doc/library/argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ The :mod:`argparse` module's support for command-line interfaces is built from t
The :class:`argparse.ArgumentParser` creates a new :class:`ArgumentParser` object. Commonly used arguments include `prog`_, `description`_, and `formatter_class`_. For example, the user can create an instance of :class:`ArgumentParser` through the following::
Comment thread
JulienPalard marked this conversation as resolved.
Outdated

>>> parser = argparse.ArgumentParser(prog='PROG', description='DESC',
... formatter_class=argparse.RawDescriptionHelpFormatter)
... formatter_class=argparse.RawDescriptionHelpFormatter)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is too long (spawns an horizontal scrollbar in the example box, in the rendered HTML), can you please use hanging indentation, like:

parser = argparse.ArgumentParser(
    prog="PROG",
    description="DESC",
    formatter_class=argparse.RawDescriptionHelpFormatter,
)


The :func:`ArgumentParser.add_argument` is a function that is used to define how a single command-line argument should be parsed. Commonly used arguments include `name or flags`_, `action`_, `default`_, `type`_, `required`_, and `help`_. An example of the function :func:`ArgumentParser.add_argument` is as follows::

>>> parser.add_argument('-v', '--verbose', action='store_true',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency please also use hanging indentation here, with a single argument per line.

... help='Show various debugging information')
... help='Show various debugging information')

Comment thread
JulienPalard marked this conversation as resolved.

Basic Usage of :func:`add_argument`
Expand Down