summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-10-16 17:17:08 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2011-10-16 17:17:42 +0100
commit98f0e2a9875470db5ba157eefdeaa7ee13a39f9e (patch)
tree163ec7cfda33f48267c138f80e20046a1ed2a510 /alot
parenta36dce5ef3e95c082b2bfde2b571abe2ab55fee4 (diff)
pep8 fixes
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/__init__.py1
-rw-r--r--alot/helper.py1
-rw-r--r--alot/message.py1
-rw-r--r--alot/widgets.py2
4 files changed, 3 insertions, 2 deletions
diff --git a/alot/commands/__init__.py b/alot/commands/__init__.py
index b374d317..d0a26021 100644
--- a/alot/commands/__init__.py
+++ b/alot/commands/__init__.py
@@ -102,7 +102,6 @@ def commandfactory(cmdline, mode='global'):
if alot.settings.config.has_option('command-aliases', cmdname):
cmdname = alot.settings.config.get('command-aliases', cmdname)
-
# get class, argparser and forced parameter
(cmdclass, parser, forcedparms) = lookup_command(cmdname, mode)
if cmdclass is None:
diff --git a/alot/helper.py b/alot/helper.py
index 7b038d29..2706ca63 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -222,6 +222,7 @@ def tag_cmp(a, b):
else:
return cmp(a, b)
+
def humanize_size(size):
r'''
>>> humanize_size(1)
diff --git a/alot/message.py b/alot/message.py
index 1a2b57f3..e00d62df 100644
--- a/alot/message.py
+++ b/alot/message.py
@@ -305,6 +305,7 @@ class Attachment(object):
if ctype == 'octet/stream' and self.get_filename():
ctype, enc = mimetypes.guess_type(self.get_filename())
return ctype
+
def get_size(self):
"""returns attachments size in bytes"""
return len(self.part.get_payload())
diff --git a/alot/widgets.py b/alot/widgets.py
index 3f7d975c..b5af55a7 100644
--- a/alot/widgets.py
+++ b/alot/widgets.py
@@ -541,7 +541,7 @@ class MessageHeaderWidget(urwid.AttrMap):
class MessageBodyWidget(urwid.AttrMap):
"""displays printable parts of an email"""
- def __init__(self, msg, tab_width = 8):
+ def __init__(self, msg, tab_width=8):
bodytxt = message.extract_body(msg).replace('\t', ' ' * tab_width)
urwid.AttrMap.__init__(self, urwid.Text(bodytxt), 'message_body')