From a28b690f422642d5a717543e820e3732813a74e2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 10 Nov 2013 07:30:48 +0530 Subject: [PATCH] pep8 --- src/calibre/web/feeds/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/calibre/web/feeds/__init__.py b/src/calibre/web/feeds/__init__.py index d819aade7a..d745cd3c94 100644 --- a/src/calibre/web/feeds/__init__.py +++ b/src/calibre/web/feeds/__init__.py @@ -78,7 +78,6 @@ class Article(object): self._title = clean_ascii_chars(val) return property(fget=fget, fset=fset) - def __repr__(self): return \ (u'''\ @@ -97,7 +96,7 @@ Has content : %s return repr(self) def is_same_as(self, other_article): - #if self.title != getattr(other_article, 'title', False): + # if self.title != getattr(other_article, 'title', False): # return False if self.url: return self.url == getattr(other_article, 'url', False) @@ -137,7 +136,6 @@ class Feed(object): break self.parse_article(item) - def populate_from_preparsed_feed(self, title, articles, oldest_article=7, max_articles_per_feed=100): self.title = unicode(title if title else _('Unknown feed')) @@ -176,7 +174,6 @@ class Feed(object): d = item.get('date', '') article.formatted_date = d - def parse_article(self, item): self.id_counter += 1 id = item.get('id', None) @@ -219,7 +216,8 @@ class Feed(object): self.articles.append(article) else: try: - self.logger.debug('Skipping article %s (%s) from feed %s as it is too old.'%(title, article.localtime.strftime('%a, %d %b, %Y %H:%M'), self.title)) + self.logger.debug('Skipping article %s (%s) from feed %s as it is too old.'% + (title, article.localtime.strftime('%a, %d %b, %Y %H:%M'), self.title)) except UnicodeDecodeError: if not isinstance(title, unicode): title = title.decode('utf-8', 'replace') @@ -310,7 +308,7 @@ class FeedCollection(list): self.duplicates = duplicates print len(duplicates) print map(len, self) - #raise + # raise def find_article(self, article): for j, f in enumerate(self):