summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2016-07-14 14:32:54 +0200
committerLucas Hoffmann <l-m-h@web.de>2016-12-09 11:26:19 +0100
commit03fcbc3382782e8d6824bfd55b063f13f64ff08f (patch)
tree49bd8ffe51d8fdb9529c0611ae9b46b1ee3482fb /alot
parent84c79143dcf0a56112d8703f24052ca1f5f2832c (diff)
Further minor style fixes
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/thread.py7
-rw-r--r--alot/db/envelope.py6
-rw-r--r--alot/settings/manager.py5
-rw-r--r--alot/ui.py4
4 files changed, 12 insertions, 10 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 306f2619..c8edf3bd 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -239,8 +239,8 @@ class ReplyCommand(Command):
# X-BeenThere is needed by sourceforge ML also winehq
# X-Mailing-List is also standart and is used by git-send-mail
to = mail['Reply-To'] or mail['X-BeenThere'] or mail['X-Mailing-List']
- # Some mail server (gmail) will not resend you own mail, so you have
- # to deal with the one in sent
+ # Some mail server (gmail) will not resend you own mail, so you
+ # have to deal with the one in sent
if to is None:
to = mail['To']
logging.debug('mail list reply to: %s', to)
@@ -284,7 +284,8 @@ class ReplyCommand(Command):
spawn=self.force_spawn,
encrypt=encrypt))
- def clear_my_address(self, my_addresses, value):
+ @staticmethod
+ def clear_my_address(my_addresses, value):
"""return recipient header without the addresses in my_addresses"""
new_value = []
for name, address in getaddresses(value):
diff --git a/alot/db/envelope.py b/alot/db/envelope.py
index abc4aa2b..40a110ea 100644
--- a/alot/db/envelope.py
+++ b/alot/db/envelope.py
@@ -48,7 +48,7 @@ class Envelope(object):
"""tags to add after successful sendout"""
def __init__(
- self, template=None, bodytext=None, headers=None, attachments=[],
+ self, template=None, bodytext=None, headers=None, attachments=[],
sign=False, sign_key=None, encrypt=False, tags=[]):
"""
:param template: if not None, the envelope will be initialised by
@@ -209,8 +209,8 @@ class Envelope(object):
raise GPGProblem(str(e), code=GPGCode.KEY_CANNOT_SIGN)
micalg = crypto.RFC3156_micalg_from_algo(signatures[0].hash_algo)
- unencrypted_msg = MIMEMultipart('signed', micalg=micalg,
- protocol='application/pgp-signature')
+ unencrypted_msg = MIMEMultipart(
+ 'signed', micalg=micalg, protocol='application/pgp-signature')
# wrap signature in MIMEcontainter
stype = 'pgp-signature; name="signature.asc"'
diff --git a/alot/settings/manager.py b/alot/settings/manager.py
index 1aaffa4f..839929b6 100644
--- a/alot/settings/manager.py
+++ b/alot/settings/manager.py
@@ -129,9 +129,8 @@ class SettingsManager(object):
regexp = abook['regexp']
if cmd is not None and regexp is not None:
ef = abook['shellcommand_external_filtering']
- args['abook'] = ExternalAddressbook(cmd,
- regexp,
- external_filtering=ef)
+ args['abook'] = ExternalAddressbook(
+ cmd, regexp, external_filtering=ef)
else:
msg = 'underspecified abook of type \'shellcommand\':'
msg += '\ncommand: %s\nregexp:%s' % (cmd, regexp)
diff --git a/alot/ui.py b/alot/ui.py
index 170f7b9a..105560d6 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -641,6 +641,7 @@ class UI(object):
d.addCallback(call_apply)
d.addCallback(call_posthook)
return d
+
def handle_signal(self, signum, frame):
"""
handles UNIX signals
@@ -649,7 +650,8 @@ class UI(object):
handle more
:param signum: The signal number (see man 7 signal)
- :param frame: The execution frame (https://docs.python.org/2/reference/datamodel.html#frame-objects)
+ :param frame: The execution frame
+ (https://docs.python.org/2/reference/datamodel.html#frame-objects)
"""
# it is a SIGINT ?
if signum == signal.SIGINT: