diff options
author | kotfu <kotfu@kotfu.net> | 2018-07-21 16:21:39 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-07-21 16:21:39 -0600 |
commit | 58e2d8bdb0f2146760ec41172174fc77cf01e2a0 (patch) | |
tree | e16fed15981aeda62c84c80a35addaf491758a6e /examples/hooks.py | |
parent | cb0c58db58920122a66cafedc764e59d5087c841 (diff) | |
download | cmd2-git-58e2d8bdb0f2146760ec41172174fc77cf01e2a0.tar.gz |
Address feedback in PR
Diffstat (limited to 'examples/hooks.py')
-rw-r--r-- | examples/hooks.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/hooks.py b/examples/hooks.py index 66922b79..3d11457a 100644 --- a/examples/hooks.py +++ b/examples/hooks.py @@ -85,7 +85,7 @@ class CmdLineApp(cmd2.Cmd): def abbrev_hook(self, data: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData: """Accept unique abbreviated commands""" target = 'do_' + data.statement.command - if not target in dir(self): + if target not in dir(self): # check if the entered command might be an abbreviation funcs = [func for func in self.keywords if func.startswith(data.statement.command)] if len(funcs) == 1: @@ -107,7 +107,7 @@ class CmdLineApp(cmd2.Cmd): last = first + 10 for x in range(first, last): - self.poutput(x) + self.poutput(str(x)) if __name__ == '__main__': |