pep8 fixes, modernizations
autopep8 -a -r -i --select E711,E712,W601,W602,W603,W604,W690,E304,E401,E502 . Also includes some manual reindentations (many are left after the print() changes). Manually checked, some modernizations not commited here.
This commit is contained in:
parent
e2ac8687c6
commit
6161a0aacd
18 changed files with 57 additions and 51 deletions
|
|
@ -26,7 +26,8 @@ from weboob.tools.backend import Module, BackendConfig
|
|||
from .browser import NolifeTVBrowser
|
||||
from .video import NolifeTVVideo
|
||||
|
||||
import urllib, time
|
||||
import urllib
|
||||
import time
|
||||
from hashlib import md5
|
||||
|
||||
__all__ = ['NolifeTVModule']
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class VideoPage(Page):
|
|||
|
||||
class VideoListPage(Page):
|
||||
def is_list_empty(self):
|
||||
return self.document.getroot() == None
|
||||
return self.document.getroot() is None
|
||||
|
||||
def iter_video(self, available_videos):
|
||||
for el in self.document.getroot().xpath('//li/a'):
|
||||
|
|
@ -101,7 +101,7 @@ class FamilyPage(Page):
|
|||
|
||||
while True:
|
||||
el = el.getnext()
|
||||
if el == None or el.get('data-role'):
|
||||
if el is None or el.get('data-role'):
|
||||
break
|
||||
h1 = el.find('.//h1')
|
||||
id = h1.getparent().attrib['href']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue