summaryrefslogtreecommitdiff
path: root/docs/examples
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2021-06-16 16:14:14 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2021-06-17 14:10:24 -0400
commitebb939ba0494648a7eb521023649816cd28be6c4 (patch)
treeda77637440bb65f26bcb05646fcb7396ddf97b8f /docs/examples
parent525d32cfde6c2f9fecb0ee44972c18d4b0bf614f (diff)
downloadcmd2-git-ebb939ba0494648a7eb521023649816cd28be6c4.tar.gz
Updated all examples to use Cmd2ArgumentParser instead of argparse.ArgumentParser.
This is best practice for consistency of appearance between built-in and custom commands.
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/first_app.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/examples/first_app.rst b/docs/examples/first_app.rst
index 85f84e31..adf50c97 100644
--- a/docs/examples/first_app.rst
+++ b/docs/examples/first_app.rst
@@ -96,7 +96,7 @@ can shout and talk piglatin. We will also use some built in methods for
this code to ``first_app.py``, so that the ``speak_parser`` attribute and the
``do_speak()`` method are part of the ``CmdLineApp()`` class::
- speak_parser = argparse.ArgumentParser()
+ speak_parser = cmd2.Cmd2ArgumentParser()
speak_parser.add_argument('-p', '--piglatin', action='store_true', help='atinLay')
speak_parser.add_argument('-s', '--shout', action='store_true', help='N00B EMULATION MODE')
speak_parser.add_argument('-r', '--repeat', type=int, help='output [n] times')