Easy spacing fixes, trailing stuff

Remove useless trailing \
Remove trailing spaces
Add missing empty lines

autopep8 -ir -j2 --select=E301,E302,E502,W291,W293,W391 .

Diff quickly checked.
This commit is contained in:
Laurent Bachelier 2013-03-15 20:01:49 +01:00
commit 7094931c92
231 changed files with 474 additions and 67 deletions

View file

@ -26,10 +26,12 @@ from ..tools import url2id
from .index import DLFPPage
class RSSComment(DLFPPage):
def on_loaded(self):
pass
class Content(object):
TAGGABLE = False
@ -50,6 +52,7 @@ class Content(object):
def is_taggable(self):
return False
class Comment(Content):
def __init__(self, article, div, reply_id):
Content.__init__(self, article.browser)
@ -105,6 +108,7 @@ class Comment(Content):
def __repr__(self):
return u"<Comment id=%r author=%r title=%r>" % (self.id, self.author, self.title)
class Article(Content):
TAGGABLE = True
@ -149,11 +153,13 @@ class Article(Content):
for c in comment.iter_all_comments():
yield c
class CommentPage(DLFPPage):
def get_comment(self):
article = Article(self.browser, self.url, None)
return Comment(article, self.parser.select(self.document.getroot(), 'li.comment', 1), 0)
class ContentPage(DLFPPage):
def on_loaded(self):
self.article = None
@ -192,9 +198,11 @@ class ContentPage(DLFPPage):
def get_tag_url(self):
return self.parser.select(self.document.getroot(), 'div.tag_in_place', 1).find('a').attrib['href']
class NewCommentPage(DLFPPage):
pass
class NewTagPage(DLFPPage):
def _is_tag_form(self, form):
return form.action.endswith('/tags')
@ -204,6 +212,7 @@ class NewTagPage(DLFPPage):
self.browser['tags'] = tag
self.browser.submit()
class NodePage(DLFPPage):
def get_errors(self):
try: