From 6ba8d96321bf4052105f6f7fb6027d9e7073ea6c Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sun, 10 Jun 2018 15:26:39 -0400 Subject: Added yet more type hinting --- cmd2/pyscript_bridge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd2/pyscript_bridge.py') diff --git a/cmd2/pyscript_bridge.py b/cmd2/pyscript_bridge.py index 7e7b940d..9353e611 100644 --- a/cmd2/pyscript_bridge.py +++ b/cmd2/pyscript_bridge.py @@ -40,7 +40,7 @@ class CommandResult(namedtuple_with_defaults('CmdResult', ['stdout', 'stderr', ' class CopyStream(object): """Copies all data written to a stream""" - def __init__(self, inner_stream, echo: bool = False): + def __init__(self, inner_stream, echo: bool = False) -> None: self.buffer = '' self.inner_stream = inner_stream self.echo = echo @@ -212,7 +212,7 @@ class ArgparseFunctor: def process_flag(action, value): if isinstance(action, argparse._CountAction): if isinstance(value, int): - for c in range(value): + for _ in range(value): cmd_str[0] += '{} '.format(action.option_strings[0]) return else: -- cgit v1.2.1