From 620a75e272f149ca4408dd46f67240cf0c2de8ec Mon Sep 17 00:00:00 2001 From: Bruno Wagner Goncalves Date: Mon, 22 Sep 2014 21:36:02 -0300 Subject: Pep8 fixed --- service/pixelated/adapter/pixelated_mail.py | 14 +++++++------- service/pixelated/adapter/soledad_querier.py | 2 -- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'service/pixelated') diff --git a/service/pixelated/adapter/pixelated_mail.py b/service/pixelated/adapter/pixelated_mail.py index eab39759..3ff392b0 100644 --- a/service/pixelated/adapter/pixelated_mail.py +++ b/service/pixelated/adapter/pixelated_mail.py @@ -90,7 +90,6 @@ class PixelatedMail: recipients = temporary_headers[header_type].split(',') temporary_headers[header_type] = map(lambda x: x.lstrip(), recipients) - def mark_as_deleted(self): # self.remove_all_tags() # self.leap_mail.setFlags((Status.PixelatedStatus.DELETED,), 1) @@ -100,12 +99,12 @@ class PixelatedMail: self.update_tags(set([])) def update_tags(self, tags): - #old_tags = self.tags - #self.tags = tags - #removed = old_tags.difference(tags) - #added = tags.difference(old_tags) - #self._persist_mail_tags(tags) - #self.tag_service.notify_tags_updated(added, removed, self.ident) + # old_tags = self.tags + # self.tags = tags + # removed = old_tags.difference(tags) + # added = tags.difference(old_tags) + # self._persist_mail_tags(tags) + # self.tag_service.notify_tags_updated(added, removed, self.ident) return self.tags def mark_as_read(self): @@ -177,6 +176,7 @@ class PixelatedMail: date = headers['received'].split(";")[-1].strip() return dateparser.parse(date).isoformat() + def from_dict(mail_dict): mail = PixelatedMail() mail.headers = mail_dict.get('header', {}) diff --git a/service/pixelated/adapter/soledad_querier.py b/service/pixelated/adapter/soledad_querier.py index 8d0a7072..952c0606 100644 --- a/service/pixelated/adapter/soledad_querier.py +++ b/service/pixelated/adapter/soledad_querier.py @@ -19,5 +19,3 @@ class SoledadQuerier: fdocs_hdocs_phash = [(f[0], f[1], f[1].content.get('body')) for f in fdocs_hdocs] fdocs_hdocs_bdocs = [(f[0], f[1], self.soledad.get_from_index('by-type-and-payloadhash', 'cnt', f[2])[0]) for f in fdocs_hdocs_phash] return [PixelatedMail.from_soledad(*raw_mail) for raw_mail in fdocs_hdocs_bdocs] - - -- cgit v1.2.3