a lot of pyflakes and pylint fixes

This commit is contained in:
Romain Bignon 2010-08-13 22:23:10 +02:00
commit 404d7290ba
43 changed files with 94 additions and 13 deletions

View file

@ -17,3 +17,5 @@
from .boobank import Boobank from .boobank import Boobank
__all__ = ['Boobank']

View file

@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .chatoob import Chatoob from .chatoob import Chatoob
__all__ = ['Chatoob']

View file

@ -18,3 +18,5 @@
from .geolooc import Geolooc from .geolooc import Geolooc
__all__ = ['Geolooc']

View file

@ -17,3 +17,5 @@
from .havesex import HaveSex from .havesex import HaveSex
__all__ = ['HaveSex']

View file

@ -18,3 +18,5 @@
from .masstransit import Masstransit from .masstransit import Masstransit
__all__ = ['Masstransit']

View file

@ -17,3 +17,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .monboob import Monboob from .monboob import Monboob
__all__ = ['Monboob']

View file

@ -1 +1,3 @@
from .qboobmsg import QBoobMsg from .qboobmsg import QBoobMsg
__all__ = ['QBoobMsg']

View file

@ -1 +1,3 @@
from .qhavesex import QHaveSex from .qhavesex import QHaveSex
__all__ = ['QHaveSex']

View file

@ -1 +1,3 @@
from .qvideoob import QVideoob from .qvideoob import QVideoob
__all__ = ['QVideoob']

View file

@ -17,3 +17,5 @@
from .qweboobcfg import QWeboobCfg from .qweboobcfg import QWeboobCfg
__all__ = ['QWeboobCfg']

View file

@ -18,3 +18,5 @@
from .traveloob import Traveloob from .traveloob import Traveloob
__all__ = ['Traveloob']

View file

@ -17,3 +17,5 @@
from .videoob import Videoob from .videoob import Videoob
__all__ = ['Videoob']

View file

@ -17,3 +17,5 @@
from .videoob_web import VideoobWeb from .videoob_web import VideoobWeb
__all__ = ['VideoobWeb']

View file

@ -17,3 +17,5 @@
from .weboobcfg import WeboobCfg from .weboobcfg import WeboobCfg
__all__ = ['WeboobCfg']

View file

@ -17,3 +17,5 @@
from .weboobcli import WeboobCli from .weboobcli import WeboobCli
__all__ = ['WeboobCli']

View file

@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .weboobdebug import WeboobDebug from .weboobdebug import WeboobDebug
__all__ = ['WeboobDebug']

View file

@ -17,3 +17,5 @@
from .weboorrents import Weboorrents from .weboorrents import Weboorrents
__all__ = ['Weboorrents']

View file

@ -17,3 +17,5 @@
from .wetboobs import WetBoobs from .wetboobs import WetBoobs
__all__ = ['WetBoobs']

View file

@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .backend import ArteBackend from .backend import ArteBackend
__all__ = ['ArteBackend']

View file

@ -18,3 +18,5 @@
from .browser import AuMBrowser from .browser import AuMBrowser
from .backend import AuMBackend from .backend import AuMBackend
__all__ = ['AuMBrowser', 'AuMBackend']

View file

@ -30,7 +30,7 @@ class WaitPage(PageBase):
return result == 'Ok' return result == 'Ok'
def process_wait(self): def process_wait(self):
while not self.check(self): while not self.check():
sleep(10) sleep(10)
self.browser.location('/home.php') self.browser.location('/home.php')

View file

@ -17,3 +17,5 @@
from .backend import BNPorcBackend from .backend import BNPorcBackend
__all__ = ['BNPorcBackend']

View file

@ -22,3 +22,6 @@ from .account_history import AccountHistory
from .login import LoginPage, ConfirmPage from .login import LoginPage, ConfirmPage
class AccountPrelevement(AccountsList): pass class AccountPrelevement(AccountsList): pass
__all__ = ['AccountsList', 'AccountComing', 'AccountHistory', 'LoginPage',
'ConfirmPage', 'AccountPrelevement']

View file

@ -17,3 +17,5 @@
from .backend import CanalTPBackend from .backend import CanalTPBackend
__all__ = ['CanalTPBackend']

View file

@ -17,3 +17,5 @@
from .backend import CragrBackend from .backend import CragrBackend
__all__ = ['CragrBackend']

View file

@ -18,3 +18,5 @@
from .accounts_list import AccountsList from .accounts_list import AccountsList
from .login import LoginPage from .login import LoginPage
__all__ = ['AccountsList', 'LoginPage']

View file

@ -83,12 +83,12 @@ class Article(object):
if a.text: self.title += a.text if a.text: self.title += a.text
if a.tail: self.title += a.tail if a.tail: self.title += a.tail
self.title = self.title.strip() self.title = self.title.strip()
subdivs = div.findall('a') # TODO use the date_s
if len(subdivs) > 1: #subdivs = div.findall('a')
date_s = unicode(subdivs[1].text) #if len(subdivs) > 1:
else: # date_s = unicode(subdivs[1].text)
date_s = unicode(div.find('i').tail) #else:
#print date_s # date_s = unicode(div.find('i').tail)
if div.attrib.get('class', '').startswith('bodydiv '): if div.attrib.get('class', '').startswith('bodydiv '):
self.body = self.browser.parser.tostring(div) self.body = self.browser.parser.tostring(div)

View file

@ -1,2 +1,4 @@
from .backend import FourChanBackend from .backend import FourChanBackend
from .browser import FourChan from .browser import FourChan
__all__ = ['FourChanBackend', 'FourChan']

View file

@ -1 +1,3 @@
from .backend import GazelleBackend from .backend import GazelleBackend
__all__ = ['GazelleBackend']

View file

@ -167,6 +167,7 @@ class TorrentsPage(BasePage):
div = self.document.getroot().cssselect('div#files_%s' % torrent.id) div = self.document.getroot().cssselect('div#files_%s' % torrent.id)
if div: if div:
torrent.files = []
for tr in div[0].find('table'): for tr in div[0].find('table'):
if tr.attrib.get('class', None) != 'colhead_dark': if tr.attrib.get('class', None) != 'colhead_dark':
torrent.files.append(tr.find('td').text) torrent.files.append(tr.find('td').text)

View file

@ -1 +1,3 @@
from .backend import GeolocIpBackend from .backend import GeolocIpBackend
__all__ = ['GeolocIpBackend']

View file

@ -1 +1,3 @@
from .backend import InaBackend from .backend import InaBackend
__all__ = ['InaBackend']

View file

@ -17,3 +17,5 @@
from .backend import TransilienBackend from .backend import TransilienBackend
__all__ = ['TransilienBackend']

View file

@ -17,3 +17,5 @@
from .backend import YahooBackend from .backend import YahooBackend
__all__ = ['YahooBackend']

View file

@ -51,12 +51,12 @@ class YahooBackend(BaseBackend, ICapWeather):
return dom return dom
def get_current(self, city_id): 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] current = dom.getElementsByTagName('yweather:condition')[0]
return Current(current.getAttribute('date'), int(current.getAttribute('temp')), current.getAttribute('text'), 'C') return Current(current.getAttribute('date'), int(current.getAttribute('temp')), current.getAttribute('text'), 'C')
def iter_forecast(self, city_id): 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'): for forecast in dom.getElementsByTagName('yweather:forecast'):
yield Forecast(forecast.getAttribute('date'), yield Forecast(forecast.getAttribute('date'),
int(forecast.getAttribute('low')), int(forecast.getAttribute('low')),

View file

@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .backend import YoujizzBackend from .backend import YoujizzBackend
__all__ = ['YoujizzBackend']

View file

@ -1 +1,3 @@
from .backend import YoupornBackend from .backend import YoupornBackend
__all__ = ['YoupornBackend']

View file

@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .backend import YoutubeBackend from .backend import YoutubeBackend
__all__ = ['YoutubeBackend']

View file

@ -19,7 +19,7 @@
import datetime import datetime
import time import time
from .base import IBaseCap, CapBaseObject, NotLoaded from .base import IBaseCap, CapBaseObject
__all__ = ['ICapMessages', 'ICapMessagesReply', 'Message'] __all__ = ['ICapMessages', 'ICapMessagesReply', 'Message']

View file

@ -223,8 +223,8 @@ class BaseApplication(object):
else: else:
res = getattr(backend, function)(*args, **kwargs) res = getattr(backend, function)(*args, **kwargs)
if self.selected_fields: if selected_fields:
fields = self.selected_fields fields = selected_fields
else: else:
fields = None fields = None

View file

@ -17,3 +17,5 @@
from .webkitgtk import WebkitGtkFormatter from .webkitgtk import WebkitGtkFormatter
__all__ = ['WebkitGtkFormatter']

View file

@ -1,2 +1,5 @@
from .qt import QtApplication, QtMainWindow, QtDo, HTMLDelegate from .qt import QtApplication, QtMainWindow, QtDo, HTMLDelegate
from .backendcfg import BackendCfg from .backendcfg import BackendCfg
__all__ = ['QtApplication', 'QtMainWindow', 'QtDo', 'HTMLDelegate',
'BackendCfg']

View file

@ -16,4 +16,10 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # 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']