summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-03-11 15:16:15 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2012-03-11 15:47:46 +0000
commit07e9fec4272f2bffabee541f161f88e7fcd082cc (patch)
treeeaf26d07f1c24c057a76acc62504d5f9cdf1fc8e
parenta88cfb0651df5cc93ff9f65c249fcb639660570c (diff)
pep8 fixes
-rw-r--r--alot/account.py9
-rw-r--r--alot/commands/envelope.py3
-rw-r--r--alot/commands/globals.py6
-rw-r--r--alot/message.py3
-rw-r--r--alot/settings/__init__.py3
-rw-r--r--alot/settings/checks.py1
-rw-r--r--alot/settings/theme.py2
7 files changed, 14 insertions, 13 deletions
diff --git a/alot/account.py b/alot/account.py
index 28dd86ec..d7273707 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -8,6 +8,7 @@ import shlex
from alot.helper import call_cmd_async
+
class SendingMailFailed(RuntimeError):
pass
@@ -39,7 +40,8 @@ class Account(object):
signature_as_attachment = None
"""attach signature file instead of appending its content to body text"""
abook = None
- """addressbook (:class:`addressbooks.AddressBook`) managing this accounts contacts"""
+ """addressbook (:class:`addressbooks.AddressBook`)
+ managing this accounts contacts"""
def __init__(self, address=None, aliases=None, realname=None,
gpg_key=None, signature=None, signature_filename=None,
@@ -99,7 +101,8 @@ class Account(object):
if isinstance(mbx, mailbox.Maildir):
# this is a dirty hack to get the path to the newly added file
# I wish the mailbox module were more helpful...
- plist = glob.glob1(os.path.join(mbx._path, 'new'), message_id + '*')
+ plist = glob.glob1(os.path.join(mbx._path, 'new'),
+ message_id + '*')
if plist:
path = os.path.join(mbx._path, 'new', plist[0])
logging.debug('path of saved msg: %s' % path)
@@ -164,5 +167,3 @@ class SendmailAccount(Account):
d.addCallback(cb)
d.addErrback(errb)
return d
-
-
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 891538c8..8f666b73 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -218,7 +218,8 @@ class EditCommand(Command):
translate = settings.get_hook('post_edit_translate')
if translate:
template = translate(template, ui=ui, dbm=ui.dbman)
- self.envelope.parse_template(template, only_body=self.edit_only_body)
+ self.envelope.parse_template(template,
+ only_body=self.edit_only_body)
if self.openNew:
ui.buffer_open(buffers.EnvelopeBuffer(ui, self.envelope))
else:
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index f118428b..05809c83 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -93,12 +93,10 @@ class PromptCommand(Command):
def apply(self, ui):
logging.info('open command shell')
mode = ui.current_buffer.modename
+ cmpl = CommandLineCompleter(ui.dbman, mode, ui.current_buffer,),
cmdline = yield ui.prompt('',
text=self.startwith,
- completer=CommandLineCompleter(ui.dbman,
- mode,
- ui.current_buffer,
- ),
+ completer=cmpl,
history=ui.commandprompthistory,
)
logging.debug('CMDLINE: %s' % cmdline)
diff --git a/alot/message.py b/alot/message.py
index c4c134f5..c91209f7 100644
--- a/alot/message.py
+++ b/alot/message.py
@@ -637,7 +637,8 @@ class Envelope(object):
if only_body:
self.body = tmp
else:
- m = re.match('(?P<h>([a-zA-Z0-9_-]+:.+\n)*)\n?(?P<b>(\s*.*)*)', tmp)
+ m = re.match('(?P<h>([a-zA-Z0-9_-]+:.+\n)*)\n?(?P<b>(\s*.*)*)',
+ tmp)
assert m
d = m.groupdict()
diff --git a/alot/settings/__init__.py b/alot/settings/__init__.py
index b6388115..50916608 100644
--- a/alot/settings/__init__.py
+++ b/alot/settings/__init__.py
@@ -50,7 +50,8 @@ class SettingsManager(object):
def read_config(self, path):
"""parse alot's config file from path"""
spec = os.path.join(DEFAULTSPATH, 'alot.rc.spec')
- newconfig = read_config(path, spec, checks={'mail_container': mail_container})
+ newconfig = read_config(path, spec,
+ checks={'mail_container': mail_container})
self._config.merge(newconfig)
hooks_path = os.path.expanduser(self._config.get('hooksfile'))
diff --git a/alot/settings/checks.py b/alot/settings/checks.py
index eb03768d..4943daa3 100644
--- a/alot/settings/checks.py
+++ b/alot/settings/checks.py
@@ -3,6 +3,7 @@ import re
from urlparse import urlparse
from validate import VdtTypeError
+
def mail_container(value):
if not re.match(r'.*://.*', value):
raise VdtTypeError(value)
diff --git a/alot/settings/theme.py b/alot/settings/theme.py
index 30f9f52f..b894c1e1 100644
--- a/alot/settings/theme.py
+++ b/alot/settings/theme.py
@@ -68,5 +68,3 @@ class Theme(object):
:type colourmode: int
"""
return self.attributes[colourmode][mode][name]
-
-