summaryrefslogtreecommitdiff
path: root/examples/arg_print.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-12-06 12:29:29 -0500
committerGitHub <noreply@github.com>2018-12-06 12:29:29 -0500
commitea182bbea386288b1acfbc35c99243a457ff1036 (patch)
treed3641a78217bbb79cbe039f80648b44b2fbdd0a4 /examples/arg_print.py
parent709af49a7f161c98260cc5ddda736987fb0f1f23 (diff)
parent9d90c1eb57c62ba1fcd8e470fa2e27248e1e9064 (diff)
downloadcmd2-git-ea182bbea386288b1acfbc35c99243a457ff1036.tar.gz
Merge pull request #607 from python-cmd2/flake8
Fix flake8 issues
Diffstat (limited to 'examples/arg_print.py')
-rwxr-xr-xexamples/arg_print.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/arg_print.py b/examples/arg_print.py
index f2168126..1a103858 100755
--- a/examples/arg_print.py
+++ b/examples/arg_print.py
@@ -13,6 +13,7 @@ import argparse
import cmd2
+
class ArgumentAndOptionPrinter(cmd2.Cmd):
""" Example cmd2 application where we create commands that just print the arguments they are called with."""
@@ -52,6 +53,7 @@ class ArgumentAndOptionPrinter(cmd2.Cmd):
pprint_parser.add_argument('-p', '--piglatin', action='store_true', help='atinLay')
pprint_parser.add_argument('-s', '--shout', action='store_true', help='N00B EMULATION MODE')
pprint_parser.add_argument('-r', '--repeat', type=int, help='output [n] times')
+
@cmd2.with_argparser_and_unknown_args(pprint_parser)
def do_pprint(self, args, unknown):
"""Print the options and argument list this options command was called with."""