summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorpazz <patricktotzke@gmail.com>2011-08-13 14:57:22 +0100
committerpazz <patricktotzke@gmail.com>2011-08-13 14:57:22 +0100
commit8cc5b5b13179619afa35cdbc0949b761aada32a2 (patch)
tree1ac9c2ae747980bc15652abf80773226473022d2 /alot
parentc11b8ba301eec23010de07fc855ffd3bfd3b14e1 (diff)
pep8
Diffstat (limited to 'alot')
-rw-r--r--alot/account.py2
-rw-r--r--alot/command.py22
-rw-r--r--alot/ui.py7
3 files changed, 16 insertions, 15 deletions
diff --git a/alot/account.py b/alot/account.py
index 57336020..7aa40635 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -192,7 +192,7 @@ class AccountManager:
for alias in newacc.aliases:
self.accountmap[alias] = newacc
else:
- logging.info('account section %s lacks fields %s' % (s, to_set))
+ logging.info('account section %s lacks %s' % (s, to_set))
def get_accounts(self):
"""return known accounts
diff --git a/alot/command.py b/alot/command.py
index 387c0ec6..287ee2fb 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -66,8 +66,8 @@ class ExitCommand(Command):
"""shuts the MUA down cleanly"""
def apply(self, ui):
if settings.config.getboolean('general', 'bug_on_exit'):
- if not ui.choice('realy quit?', choices={'yes':['y','q','enter'],
- 'no':['n']}) == 'yes':
+ if not ui.choice('realy quit?', choices={'yes': ['y', 'enter'],
+ 'no': ['n']}) == 'yes':
return
raise urwid.ExitMainLoop()
@@ -869,8 +869,8 @@ class EnvelopeAttachCommand(Command):
for path in self.files:
ctype, encoding = mimetypes.guess_type(path)
if ctype is None or encoding is not None:
- # No guess could be made, or the file is encoded (compressed), so
- # use a generic bag-of-bits type.
+ # No guess could be made, or the file is encoded (compressed),
+ # so use a generic bag-of-bits type.
ctype = 'application/octet-stream'
maintype, subtype = ctype.split('/', 1)
if maintype == 'text':
@@ -1053,13 +1053,13 @@ def interpret_commandline(cmdline, mode):
if os.path.isfile(filepath):
return commandfactory(cmd, mode=mode, path=filepath)
- elif not params and cmd in ['exit', 'flush', 'pyshell', 'taglist', 'bclose',
- 'compose', 'openfocussed', 'closefocussed',
- 'bnext', 'bprevious', 'retag', 'refresh',
- 'bufferlist', 'refineprompt', 'reply', 'open',
- 'groupreply', 'bounce', 'openthread',
- 'toggleheaders', 'send', 'reedit', 'select',
- 'retagprompt']:
+ elif not params and cmd in ['exit', 'flush', 'pyshell', 'taglist',
+ 'bclose', 'compose', 'openfocussed',
+ 'closefocussed', 'bnext', 'bprevious', 'retag',
+ 'refresh', 'bufferlist', 'refineprompt',
+ 'reply', 'open', 'groupreply', 'bounce',
+ 'openthread', 'toggleheaders', 'send',
+ 'reedit', 'select', 'retagprompt']:
return commandfactory(cmd, mode=mode)
else:
return None
diff --git a/alot/ui.py b/alot/ui.py
index dba75f00..15e6dd7a 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -216,7 +216,7 @@ class UI:
self.notificationbar = None
self.update()
- def choice(self, message, choices={'yes':['y'], 'no':['n']}):
+ def choice(self, message, choices={'yes': ['y'], 'no': ['n']}):
"""prompt user to make a choice
:param message: string to display before list of choices
@@ -228,7 +228,8 @@ class UI:
cols = urwid.Columns([urwid.Text(msg)])
return urwid.AttrMap(cols, 'notify_' + prio)
- line = ', '.join(['(%s):%s' % ('/'.join(v), k) for k, v in choices.items()])
+ cstrings = ['(%s):%s' % ('/'.join(v), k) for k, v in choices.items()]
+ line = ', '.join(cstrings)
msgs = [build_line(message + ' ' + line, 'normal')]
footer = self.mainframe.get_footer()
@@ -259,7 +260,7 @@ class UI:
:type message: str
:param priority: priority string, used to format the popup: currently,
'normal' and 'error' are defined. If you use 'X' here,
- the attribute 'notify_X' will be used to format the popup.
+ the attribute 'notify_X' is used to format the popup.
:type priority: str
:param timeout: seconds until message disappears. Defaults to the value
of 'notify_timeout' in the general config section.