mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-03 15:21:41 +01:00
python: pep8 compliance for thread.py
This commit is contained in:
parent
be7947f459
commit
61b96f2c24
1 changed files with 35 additions and 30 deletions
|
@ -23,7 +23,7 @@ from notmuch.message import Messages
|
|||
from notmuch.tag import Tags
|
||||
from datetime import date
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
class Threads(object):
|
||||
"""Represents a list of notmuch threads
|
||||
|
||||
|
@ -160,7 +160,7 @@ class Threads(object):
|
|||
if self._threads is not None:
|
||||
nmlib.notmuch_messages_destroy(self._threads)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
class Thread(object):
|
||||
"""Represents a single message thread."""
|
||||
|
||||
|
@ -238,7 +238,6 @@ class Thread(object):
|
|||
raise NotmuchError(STATUS.NOT_INITIALIZED)
|
||||
return nmlib.notmuch_thread_get_total_messages(self._thread)
|
||||
|
||||
|
||||
def get_toplevel_messages(self):
|
||||
"""Returns a :class:`Messages` iterator for the top-level messages in
|
||||
'thread'
|
||||
|
@ -374,7 +373,13 @@ class Thread(object):
|
|||
thread['subject'] = self.get_subject()
|
||||
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):
|
||||
"""Close and free the notmuch Thread"""
|
||||
|
|
Loading…
Reference in a new issue