pep8 blank lines fixes

flake8 --select W391,E302,E301,E304

autopep8 can't fix W391 even though it claims it can.
Fixed using a simple custom script.
This commit is contained in:
Laurent Bachelier 2014-10-10 23:04:08 +02:00
commit 448c06d125
142 changed files with 249 additions and 25 deletions

View file

@ -28,6 +28,7 @@ from .pages import VideoPage, VideoListPage, FamilyPage, AboPage, LoginPage, Hom
__all__ = ['NolifeTVBrowser']
class NolifeTVBrowser(Browser):
USER_AGENT = Browser.USER_AGENTS['desktop_firefox']
DOMAIN = 'mobile.nolife-tv.com'

View file

@ -32,6 +32,7 @@ from hashlib import md5
__all__ = ['NolifeTVModule']
class NolifeTVModule(Module, CapVideo, CapCollection):
NAME = 'nolifetv'
MAINTAINER = u'Romain Bignon'

View file

@ -67,6 +67,7 @@ class VideoPage(Page):
seconds=int(m.group(3)))
return video
class VideoListPage(Page):
def is_list_empty(self):
return self.document.getroot() is None
@ -85,6 +86,7 @@ class VideoListPage(Page):
video.title = video.title + ' - ' + strongs[3].text
yield video
class FamilyPage(Page):
def iter_category(self):
subs = list()
@ -109,6 +111,7 @@ class FamilyPage(Page):
if m and m.group(1):
yield Collection([m.group(1)], unicode(h1.text))
class AboPage(Page):
def get_available_videos(self):
available = ['[Gratuit]']
@ -130,6 +133,7 @@ class LoginPage(Page):
self.browser['password'] = str(password)
self.browser.submit()
class HomePage(Page):
def is_logged(self):
return len(self.document.xpath('//a[@href="deconnexion/"]')) == 1

View file

@ -21,6 +21,7 @@
from weboob.tools.test import BackendTest
from weboob.capabilities.video import BaseVideo
class NolifeTVTest(BackendTest):
MODULE = 'nolifetv'