Code clarity fixes
autopep8 -ir -j2 --select=E303,E125 Diff checked manually.
This commit is contained in:
parent
dcb2b61b18
commit
c21d1f7925
37 changed files with 6 additions and 59 deletions
|
|
@ -37,7 +37,6 @@ class NewsfeedBackend(BaseBackend, ICapMessages):
|
|||
CONFIG = BackendConfig(Value('url', label="Atom/RSS feed's url", regexp='https?://.*'))
|
||||
STORAGE = {'seen': []}
|
||||
|
||||
|
||||
def iter_threads(self):
|
||||
for article in Newsfeed(self.config['url'].get()).iter_entries():
|
||||
yield self.get_thread(article.id, article)
|
||||
|
|
@ -75,15 +74,12 @@ class NewsfeedBackend(BaseBackend, ICapMessages):
|
|||
flags=flags)
|
||||
return thread
|
||||
|
||||
|
||||
|
||||
def iter_unread_messages(self):
|
||||
for thread in self.iter_threads():
|
||||
for m in thread.iter_all_messages():
|
||||
if m.flags & m.IS_UNREAD:
|
||||
yield m
|
||||
|
||||
|
||||
def set_message_read(self, message):
|
||||
self.storage.get('seen', default=[]).append(message.thread.id)
|
||||
self.storage.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue