diff options
author | pazz <patricktotzke@gmail.com> | 2011-07-30 16:22:19 +0100 |
---|---|---|
committer | pazz <patricktotzke@gmail.com> | 2011-07-30 16:22:19 +0100 |
commit | d1877b113870f32d1cfcfe8b89a27513d33b9b24 (patch) | |
tree | cf5a9fa99c293b7a9eff4564a6949603f5b9e366 | |
parent | 5674e56cdd365457c690618c86a074b1becabfcb (diff) |
pep8
-rw-r--r-- | alot/command.py | 6 | ||||
-rw-r--r-- | alot/completion.py | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/alot/command.py b/alot/command.py index 6936551f..b30c7b2c 100644 --- a/alot/command.py +++ b/alot/command.py @@ -495,7 +495,8 @@ class ReplyCommand(Command): cleared = self.clear_my_address(my_addresses, mail['To']) if cleared: logging.info(mail['From'] + ', ' + cleared) - reply['To'] = encode_header('To', mail['From'] + ', ' + cleared) + to = mail['From'] + ', ' + cleared + reply['To'] = encode_header('To', to) logging.info(reply['To']) else: reply['To'] = encode_header('To', mail['From']) @@ -540,6 +541,7 @@ class BounceMailCommand(Command): del(mail['To']) ui.apply_command(ComposeCommand(mail=mail)) + ### ENVELOPE class EnvelopeOpenCommand(Command): def __init__(self, mail=None, **kwargs): @@ -664,10 +666,8 @@ class TaglistSelectCommand(Command): ui.apply_command(cmd) - ########### #Factory - COMMANDS = { 'bnext': (BufferFocusCommand, {'offset': 1}), 'bprevious': (BufferFocusCommand, {'offset': -1}), diff --git a/alot/completion.py b/alot/completion.py index c0a49d39..d32769b9 100644 --- a/alot/completion.py +++ b/alot/completion.py @@ -64,7 +64,7 @@ class TagsCompleter(Completer): otags = original.split(',') prefix = otags[-1] tags = self.dbman.get_all_tags() - if len(otags)>1 and last: + if len(otags) > 1 and last: return [] else: matching = [t[len(prefix):] for t in tags if t.startswith(prefix)] @@ -92,6 +92,7 @@ class AccountCompleter(Completer): valids = self.accountman.get_account_addresses() return [a[len(prefix):] for a in valids if a.startswith(prefix)] + class CommandCompleter(Completer): """completes commands""" @@ -119,8 +120,8 @@ class CommandLineCompleter(Completer): self._contactscompleter = ContactsCompleter() def complete(self, prefix): - words = prefix.split(' ',1) - if len(words)<=1: # we complete commands + words = prefix.split(' ', 1) + if len(words) <= 1: # we complete commands return self._commandcompleter.complete(prefix) else: cmd, params = words |