From 59e1ee96651db8f12cea133c49dcc2d487b3e421 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Thu, 31 Oct 2013 09:42:35 -0600 Subject: code style fixes --- cliff/complete.py | 11 ++++------- 1 file 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}" -- cgit v1.2.1