python: pep8 compliance for thread.py

This commit is contained in:
pazz 2011-07-12 21:22:13 +01:00 committed by Sebastian Spaeth
parent be7947f459
commit 61b96f2c24

View file

@ -23,7 +23,7 @@ from notmuch.message import Messages
from notmuch.tag import Tags from notmuch.tag import Tags
from datetime import date from datetime import date
#------------------------------------------------------------------------------
class Threads(object): class Threads(object):
"""Represents a list of notmuch threads """Represents a list of notmuch threads
@ -160,7 +160,7 @@ class Threads(object):
if self._threads is not None: if self._threads is not None:
nmlib.notmuch_messages_destroy(self._threads) nmlib.notmuch_messages_destroy(self._threads)
#------------------------------------------------------------------------------
class Thread(object): class Thread(object):
"""Represents a single message thread.""" """Represents a single message thread."""
@ -238,7 +238,6 @@ class Thread(object):
raise NotmuchError(STATUS.NOT_INITIALIZED) raise NotmuchError(STATUS.NOT_INITIALIZED)
return nmlib.notmuch_thread_get_total_messages(self._thread) return nmlib.notmuch_thread_get_total_messages(self._thread)
def get_toplevel_messages(self): def get_toplevel_messages(self):
"""Returns a :class:`Messages` iterator for the top-level messages in """Returns a :class:`Messages` iterator for the top-level messages in
'thread' 'thread'
@ -374,7 +373,13 @@ class Thread(object):
thread['subject'] = self.get_subject() thread['subject'] = self.get_subject()
thread['tags'] = self.get_tags() thread['tags'] = self.get_tags()
return "thread:%(id)s %(date)12s [%(matched)d/%(total)d] %(authors)s; %(subject)s (%(tags)s)" % (thread) return "thread:%s %12s [%d/%d] %s; %s (%s)" % (thread['id'],
thread['date'],
thread['matched'],
thread['total'],
thread['authors'],
thread['subject'],
thread['tags'])
def __del__(self): def __del__(self):
"""Close and free the notmuch Thread""" """Close and free the notmuch Thread"""