Commit 404d7290 authored by Romain Bignon's avatar Romain Bignon

a lot of pyflakes and pylint fixes

parent 28f622e0
......@@ -17,3 +17,5 @@
from .boobank import Boobank
__all__ = ['Boobank']
......@@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .chatoob import Chatoob
__all__ = ['Chatoob']
......@@ -18,3 +18,5 @@
from .geolooc import Geolooc
__all__ = ['Geolooc']
......@@ -17,3 +17,5 @@
from .havesex import HaveSex
__all__ = ['HaveSex']
......@@ -18,3 +18,5 @@
from .masstransit import Masstransit
__all__ = ['Masstransit']
......@@ -17,3 +17,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .monboob import Monboob
__all__ = ['Monboob']
from .qboobmsg import QBoobMsg
__all__ = ['QBoobMsg']
from .qhavesex import QHaveSex
__all__ = ['QHaveSex']
from .qvideoob import QVideoob
__all__ = ['QVideoob']
......@@ -17,3 +17,5 @@
from .qweboobcfg import QWeboobCfg
__all__ = ['QWeboobCfg']
......@@ -18,3 +18,5 @@
from .traveloob import Traveloob
__all__ = ['Traveloob']
......@@ -17,3 +17,5 @@
from .videoob import Videoob
__all__ = ['Videoob']
......@@ -17,3 +17,5 @@
from .videoob_web import VideoobWeb
__all__ = ['VideoobWeb']
......@@ -17,3 +17,5 @@
from .weboobcfg import WeboobCfg
__all__ = ['WeboobCfg']
......@@ -17,3 +17,5 @@
from .weboobcli import WeboobCli
__all__ = ['WeboobCli']
......@@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .weboobdebug import WeboobDebug
__all__ = ['WeboobDebug']
......@@ -17,3 +17,5 @@
from .weboorrents import Weboorrents
__all__ = ['Weboorrents']
......@@ -17,3 +17,5 @@
from .wetboobs import WetBoobs
__all__ = ['WetBoobs']
......@@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .backend import ArteBackend
__all__ = ['ArteBackend']
......@@ -18,3 +18,5 @@
from .browser import AuMBrowser
from .backend import AuMBackend
__all__ = ['AuMBrowser', 'AuMBackend']
......@@ -30,7 +30,7 @@ class WaitPage(PageBase):
return result == 'Ok'
def process_wait(self):
while not self.check(self):
while not self.check():
sleep(10)
self.browser.location('/home.php')
......
......@@ -17,3 +17,5 @@
from .backend import BNPorcBackend
__all__ = ['BNPorcBackend']
......@@ -22,3 +22,6 @@ from .account_history import AccountHistory
from .login import LoginPage, ConfirmPage
class AccountPrelevement(AccountsList): pass
__all__ = ['AccountsList', 'AccountComing', 'AccountHistory', 'LoginPage',
'ConfirmPage', 'AccountPrelevement']
......@@ -17,3 +17,5 @@
from .backend import CanalTPBackend
__all__ = ['CanalTPBackend']
......@@ -17,3 +17,5 @@
from .backend import CragrBackend
__all__ = ['CragrBackend']
......@@ -18,3 +18,5 @@
from .accounts_list import AccountsList
from .login import LoginPage
__all__ = ['AccountsList', 'LoginPage']
......@@ -83,12 +83,12 @@ class Article(object):
if a.text: self.title += a.text
if a.tail: self.title += a.tail
self.title = self.title.strip()
subdivs = div.findall('a')
if len(subdivs) > 1:
date_s = unicode(subdivs[1].text)
else:
date_s = unicode(div.find('i').tail)
#print date_s
# TODO use the date_s
#subdivs = div.findall('a')
#if len(subdivs) > 1:
# date_s = unicode(subdivs[1].text)
#else:
# date_s = unicode(div.find('i').tail)
if div.attrib.get('class', '').startswith('bodydiv '):
self.body = self.browser.parser.tostring(div)
......
from .backend import FourChanBackend
from .browser import FourChan
__all__ = ['FourChanBackend', 'FourChan']
from .backend import GazelleBackend
__all__ = ['GazelleBackend']
......@@ -167,6 +167,7 @@ class TorrentsPage(BasePage):
div = self.document.getroot().cssselect('div#files_%s' % torrent.id)
if div:
torrent.files = []
for tr in div[0].find('table'):
if tr.attrib.get('class', None) != 'colhead_dark':
torrent.files.append(tr.find('td').text)
......
from .backend import GeolocIpBackend
__all__ = ['GeolocIpBackend']
from .backend import InaBackend
__all__ = ['InaBackend']
......@@ -17,3 +17,5 @@
from .backend import TransilienBackend
__all__ = ['TransilienBackend']
......@@ -17,3 +17,5 @@
from .backend import YahooBackend
__all__ = ['YahooBackend']
......@@ -51,12 +51,12 @@ class YahooBackend(BaseBackend, ICapWeather):
return dom
def get_current(self, city_id):
dom = self._get_dom(city_id)
dom = self._get_weather_dom(city_id)
current = dom.getElementsByTagName('yweather:condition')[0]
return Current(current.getAttribute('date'), int(current.getAttribute('temp')), current.getAttribute('text'), 'C')
def iter_forecast(self, city_id):
dom = self._get_dom(city_id)
dom = self._get_weather_dom(city_id)
for forecast in dom.getElementsByTagName('yweather:forecast'):
yield Forecast(forecast.getAttribute('date'),
int(forecast.getAttribute('low')),
......
......@@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .backend import YoujizzBackend
__all__ = ['YoujizzBackend']
from .backend import YoupornBackend
__all__ = ['YoupornBackend']
......@@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .backend import YoutubeBackend
__all__ = ['YoutubeBackend']
......@@ -19,7 +19,7 @@
import datetime
import time
from .base import IBaseCap, CapBaseObject, NotLoaded
from .base import IBaseCap, CapBaseObject
__all__ = ['ICapMessages', 'ICapMessagesReply', 'Message']
......
......@@ -223,8 +223,8 @@ class BaseApplication(object):
else:
res = getattr(backend, function)(*args, **kwargs)
if self.selected_fields:
fields = self.selected_fields
if selected_fields:
fields = selected_fields
else:
fields = None
......
......@@ -17,3 +17,5 @@
from .webkitgtk import WebkitGtkFormatter
__all__ = ['WebkitGtkFormatter']
from .qt import QtApplication, QtMainWindow, QtDo, HTMLDelegate
from .backendcfg import BackendCfg
__all__ = ['QtApplication', 'QtMainWindow', 'QtDo', 'HTMLDelegate',
'BackendCfg']
......@@ -16,4 +16,10 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from weboob.tools.browser.browser import *
from weboob.tools.browser.browser import BrowserIncorrectPassword, BrowserBanned, \
BrowserUnavailable, BrowserRetry, \
BrowserHTTPError, BasePage, BaseBrowser
__all__ = ['BrowserIncorrectPassword', 'BrowserBanned', 'BrowserUnavailable', 'BrowserRetry',
'BrowserHTTPError', 'BasePage', 'BaseBrowser']
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment