diff options
author | Terry Howe <terrylhowe@gmail.com> | 2013-10-31 09:42:35 -0600 |
---|---|---|
committer | Terry Howe <terrylhowe@gmail.com> | 2013-10-31 09:42:35 -0600 |
commit | 59e1ee96651db8f12cea133c49dcc2d487b3e421 (patch) | |
tree | 6b4e505c2c601842f18df97e852cbfaba712b240 | |
parent | 5d33c97404e5661bca62b1e9907740ee83cec3c6 (diff) | |
download | cliff-59e1ee96651db8f12cea133c49dcc2d487b3e421.tar.gz |
code style fixes
-rw-r--r-- | cliff/complete.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cliff/complete.py b/cliff/complete.py index c31c659..b469e84 100644 --- a/cliff/complete.py +++ b/cliff/complete.py @@ -16,10 +16,8 @@ class CompleteDictionary: def add_command(self, command, actions): optstr = ' '.join(opt for action in actions - for opt in action.option_strings) + for opt in action.option_strings) dicto = self._dictionary - last = None - lastsubcmd = None for subcmd in command[:-1]: dicto = dicto.setdefault(subcmd, {}) dicto[command[-1]] = optstr @@ -49,7 +47,7 @@ class CompleteDictionary: class CompleteShellBase(object): - """ base class for bash completion generation + """base class for bash completion generation """ def __init__(self, name, output): self.name = str(name) @@ -62,6 +60,7 @@ class CompleteShellBase(object): self.output.write(' cmds_{0}=\'{1}\'\n'.format(*datum)) self.output.write(self.get_trailer()) + class CompleteNoCode(CompleteShellBase): """completion with no code """ @@ -92,9 +91,7 @@ class CompleteBash(CompleteShellBase): """) def get_trailer(self): - return ( -""" - + return (""" cmd="" words[0]="" completed="${cmds}" |