Commit 3da02fde authored by Laurent Bachelier's avatar Laurent Bachelier 🐧

Remove useless __all__ in modules

They bring nothing of value (we never use import * anyway) and introduce
a maintenance burden.

The __all__ that I left might not be very useful either but at least
they are not a pain to maintain; they are also used by pyflakes in some
cases.
parent 174b5674
......@@ -23,9 +23,6 @@ from weboob.capabilities.base import NotAvailable, NotLoaded
from weboob.tools.browser import BasePage
__all__ = ['RecipePage', 'ResultsPage']
class ResultsPage(BasePage):
""" Page which contains results as a list of recipies
"""
......
......@@ -24,7 +24,6 @@ from .job import AdeccoJobAdvert
import datetime
import re
__all__ = ['SearchPage', 'AdvertPage']
MONTHS = [u'janvier', u'février', u'mars', u'avril', u'mai', u'juin', u'juillet', u'août', u'septembre', u'octobre', u'novembre', u'décembre']
......
......@@ -28,9 +28,6 @@ from weboob.capabilities.bank import Account
from weboob.tools.capabilities.bank.transactions import FrenchTransaction as Transaction
__all__ = ['LoginPage', 'AccountsPage']
class LoginPage(HTMLPage):
def login(self, username, password):
form = self.get_form(nr=1)
......
......@@ -23,9 +23,6 @@ from weboob.capabilities.base import NotAvailable, NotLoaded
from weboob.tools.browser import BasePage
__all__ = ['RecipePage', 'ResultsPage', 'FourOFourPage']
class FourOFourPage(BasePage):
pass
......
......@@ -26,8 +26,6 @@ from weboob.tools.browser import BasePage,BrokenPageError
from weboob.capabilities.bill import Subscription, Detail, Bill
__all__ = ['AmeliBasePage', 'LoginPage', 'HomePage', 'AccountPage', 'LastPaymentsPage', 'PaymentDetailsPage', 'BillsPage']
# Ugly array to avoid the use of french locale
FRENCH_MONTHS = [u'janvier', u'février', u'mars', u'avril', u'mai', u'juin', u'juillet', u'août', u'septembre', u'octobre', u'novembre', u'décembre']
......
......@@ -21,9 +21,6 @@
from weboob.tools.test import BackendTest
__all__ = ['AmeliTest']
class AmeliTest(BackendTest):
BACKEND = 'ameli'
......
......@@ -26,8 +26,6 @@ from weboob.tools.browser import BasePage
from weboob.capabilities.bill import Subscription, Detail, Bill
__all__ = ['LoginPage', 'HomePage', 'AccountPage', 'HistoryPage', 'BillsPage']
# Ugly array to avoid the use of french locale
FRENCH_MONTHS = [u'janvier', u'février', u'mars', u'avril', u'mai', u'juin', u'juillet', u'août', u'septembre', u'octobre', u'novembre', u'décembre']
......
......@@ -21,9 +21,6 @@
from weboob.tools.test import BackendTest
__all__ = ['AmeliProTest']
class AmeliProTest(BackendTest):
BACKEND = 'AmeliPro'
......
......@@ -29,9 +29,6 @@ from weboob.tools.capabilities.bank.transactions import FrenchTransaction as Tra
from weboob.tools.date import ChaoticDateGuesser
__all__ = ['LoginPage', 'AccountsPage', 'TransactionsPage']
class LoginPage(BasePage):
def login(self, username, password):
self.browser.select_form(name='ssoform')
......@@ -43,7 +40,6 @@ class LoginPage(BasePage):
self.browser.submit(nologin=True)
class AccountsPage(BasePage):
def get_list(self):
for box in self.document.getroot().cssselect('div.roundedBox div.contentBox'):
......@@ -67,7 +63,6 @@ class TransactionsPage(BasePage):
COL_LABEL = 3
COL_VALUE = -1
def is_last(self):
current = False
for option in self.document.xpath('//select[@id="viewPeriod"]/option'):
......
......@@ -25,8 +25,6 @@ import re
from .job import ApecJobAdvert
__all__ = ['SearchPage', 'AdvertPage']
class SearchPage(BasePage):
def iter_job_adverts(self):
......
......@@ -25,9 +25,6 @@ from weboob.tools.browser import BasePage
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
__all__ = ['LoginPage', 'AccountsPage', 'OperationsPage']
class LoginPage(BasePage):
def login(self, username, password):
self.browser.select_form(nr=0)
......@@ -77,7 +74,6 @@ class OperationsPage(BasePage):
label = self.parser.tocleanstring(tds[self.COL_LABEL])
amount = self.parser.tocleanstring(tds[self.COL_AMOUNT])
if len(amount) == 0:
continue
......
......@@ -25,8 +25,6 @@ from weboob.tools.browser import BasePage, BrokenPageError
from weboob.capabilities import NotAvailable
__all__ = ['IndexPage', 'VideoPage', 'ForbiddenVideo', 'LoginPage', 'LoginRedirectPage']
from .video import ArretSurImagesVideo
......
......@@ -21,9 +21,6 @@
from weboob.capabilities.video import BaseVideo
__all__ = ['ArretSurImagesVideo']
class ArretSurImagesVideo(BaseVideo):
@classmethod
def id2url(cls, _id):
......
......@@ -25,8 +25,6 @@ from weboob.capabilities.image import BaseImage
from weboob.capabilities.collection import Collection
from .video import ArteLiveVideo
__all__ = ['ArteLivePage', 'ArteLiveVideoPage']
class ArteLiveVideoPage(BasePage):
def get_video(self, video=None):
......
......@@ -21,9 +21,6 @@
from weboob.capabilities.video import BaseVideo
__all__ = ['ArteVideo', 'ArteLiveVideo']
class ArteVideo(BaseVideo):
@classmethod
def id2url(cls, _id):
......
......@@ -23,9 +23,6 @@ from weboob.capabilities.base import NotAvailable
from weboob.tools.browser import BasePage
__all__ = ['SubtitlesPage', 'SearchPage']
class SearchPage(BasePage):
def iter_subtitles(self, language, pattern):
fontresult = self.parser.select(self.document.getroot(), 'div.search-results font.search-results')
......
......@@ -20,9 +20,6 @@
import re
__all__ = ['AntiSpam']
class AntiSpam(object):
def check_thread(self, thread):
resume = thread['title']
......
......@@ -18,8 +18,6 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
import random
from weboob.tools.browser import BrowserUnavailable, BrowserIncorrectPassword
......@@ -33,9 +31,6 @@ from aum.exceptions import AdopteWait, AdopteBanned
from aum.browser import AuMBrowser
__all__ = ['PriorityConnection']
class PriorityConnection(Optimization):
CONFIG = ValuesDict(ValueInt('minimal', label='Minimal of godchilds', default=5),
Value('domain', label='Domain to use for fake accounts emails', default='aum.example.com'),
......
......@@ -18,8 +18,6 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from random import randint
from weboob.tools.browser import BrowserUnavailable
......@@ -27,9 +25,6 @@ from weboob.capabilities.dating import Optimization
from weboob.tools.log import getLogger
__all__ = ['ProfilesWalker']
class ProfilesWalker(Optimization):
def __init__(self, sched, storage, browser):
self.sched = sched
......
......@@ -18,17 +18,12 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.browser import BrowserUnavailable
from weboob.capabilities.dating import Optimization
from weboob.capabilities.contact import QueryError
from weboob.tools.log import getLogger
__all__ = ['QueriesQueue']
class QueriesQueue(Optimization):
def __init__(self, sched, storage, browser):
self.sched = sched
......
......@@ -22,9 +22,6 @@ from weboob.tools.browser import BrowserUnavailable
from weboob.capabilities.dating import Optimization
__all__ = ['Visibility']
class Visibility(Optimization):
def __init__(self, sched, browser):
self.sched = sched
......
......@@ -22,9 +22,6 @@ from weboob.tools.test import BackendTest
from weboob.tools.browser import BrowserUnavailable
__all__ = ['AuMTest']
class AuMTest(BackendTest):
BACKEND = 'aum'
......
......@@ -28,9 +28,6 @@ from weboob.tools.capabilities.bank.transactions import FrenchTransaction
from weboob.tools.captcha.virtkeyboard import MappedVirtKeyboard
__all__ = ['LoginPage', 'AccountsPage', 'TransactionsPage', 'CBTransactionsPage', 'UnavailablePage']
class BasePage(_BasePage):
def get_view_state(self):
return self.document.xpath('//input[@name="javax.faces.ViewState"]')[0].attrib['value']
......
......@@ -32,9 +32,6 @@ from weboob.tools.capabilities.bank.transactions import FrenchTransaction
from weboob.tools.exceptions import ParseError
__all__ = ['LoginPage', 'IndexPage', 'AccountsPage', 'OperationsPage']
class Transaction(FrenchTransaction):
PATTERNS = [(re.compile(ur'^(?P<text>.*?) - traité le \d+/\d+$'), FrenchTransaction.TYPE_CARD)]
......@@ -192,7 +189,6 @@ class OperationsPage(LoggedPage, HTMLPage):
self.env['amount'] = Transaction.Amount('./td[4]')(self.el)
return self.env['amount'] > 0
class debit(ItemElement):
klass = Transaction
obj_type = Transaction.TYPE_CARD
......
......@@ -29,9 +29,6 @@ from weboob.capabilities.bank import Account
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
__all__ = ['LoginPage', 'IndexPage', 'AccountsPage', 'CardsPage', 'TransactionsPage', 'UnavailablePage', 'RedirectPage']
class WikipediaARC4(object):
def __init__(self, key=None):
self.state = range(256)
......
......@@ -27,10 +27,6 @@ from weboob.capabilities.bank import Account
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
__all__ = ['LoginPage', 'Login2Page', 'IndexPage', 'AccountsPage', 'TransactionsPage',
'CardPage', 'ValuationPage', 'LoanPage', 'MarketPage']
class LoginPage(BasePage):
def login(self, login, passwd):
self.browser.select_form(name='frmLogin')
......
......@@ -28,9 +28,6 @@ from weboob.tools.browser2.page import HTMLPage, method
from weboob.tools.browser2.filters import Filter, Link, CleanText, Env, Regexp, CombineDate, CleanHTML
__all__ = ['ProgramPage', 'EventPage']
class BiplanPrice(Filter):
def filter(self, el):
index = 1 if len(el) > 1 else 0
......
......@@ -30,9 +30,6 @@ from weboob.tools.captcha.virtkeyboard import MappedVirtKeyboard, VirtKeyboardEr
from weboob.tools.misc import to_unicode
__all__ = ['LoginPage', 'AccountsPage', 'UnknownPage']
class Transaction(FrenchTransaction):
PATTERNS = [(re.compile(u'^(?P<category>CHEQUE)(?P<text>.*)'), FrenchTransaction.TYPE_CHECK),
(re.compile('^(?P<category>FACTURE CARTE) DU (?P<dd>\d{2})(?P<mm>\d{2})(?P<yy>\d{2}) (?P<text>.*?)( CA?R?T?E? ?\d*X*\d*)?$'),
......
......@@ -26,8 +26,6 @@ from weboob.capabilities.bank import Account
from weboob.capabilities.base import NotAvailable
from weboob.tools.browser import BasePage, BrokenPageError, BrowserPasswordExpired
__all__ = ['AccountsList', 'AccountPrelevement']
class AccountsList(BasePage):
ACCOUNT_TYPES = {
......
......@@ -25,8 +25,6 @@ import urllib
from weboob.tools.browser import BasePage, BrowserUnavailable
from weboob.tools.captcha.virtkeyboard import VirtKeyboard, VirtKeyboardError
__all__ = ['LoginPage', 'ConfirmPage', 'ChangePasswordPage']
class BNPVirtKeyboard(VirtKeyboard):
symbols={'0': '9cc4789a2cb223e8f2d5e676e90264b5',
......
......@@ -28,8 +28,6 @@ from datetime import datetime
from lxml.html import make_links_absolute
__all__ = ['MessagesPage', 'MessagePage']
class MessagesPage(BasePage):
def iter_threads(self):
......
......@@ -24,9 +24,6 @@ from weboob.tools.browser import BasePage
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
__all__ = ['AccountHistory', 'AccountComing']
class Transaction(FrenchTransaction):
PATTERNS = [(re.compile(u'^(?P<category>CHEQUE)(?P<text>.*)'), FrenchTransaction.TYPE_CHECK),
(re.compile('^(?P<category>FACTURE CARTE) DU (?P<dd>\d{2})(?P<mm>\d{2})(?P<yy>\d{2}) (?P<text>.*?)( CA?R?T?E? ?\d*X*\d*)?$'),
......
......@@ -25,9 +25,6 @@ from weboob.tools.ordereddict import OrderedDict
from weboob.capabilities.bank import TransferError
__all__ = ['TransferPage', 'TransferConfirmPage', 'TransferCompletePage']
class Account(object):
def __init__(self, id, label, send_checkbox, receive_checkbox):
self.id = id
......
......@@ -29,9 +29,6 @@ from weboob.tools.browser import BasePage
from .perso.transactions import Transaction
__all__ = ['ProAccountsList', 'ProAccountHistory']
class ProAccountsList(BasePage):
COL_LABEL = 1
COL_ID = 2
......
......@@ -26,9 +26,6 @@ from weboob.tools.browser import BasePage
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
__all__ = ['AccountHistory']
class Transaction(FrenchTransaction):
PATTERNS = [(re.compile(u'^CHQ\. (?P<text>.*)'), FrenchTransaction.TYPE_CHECK),
(re.compile('^(ACHAT|PAIEMENT) CARTE (?P<dd>\d{2})(?P<mm>\d{2})(?P<yy>\d{2}) (?P<text>.*)'),
......
......@@ -25,9 +25,6 @@ from weboob.tools.browser import BasePage
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
__all__ = ['CardHistory']
class Transaction(FrenchTransaction):
PATTERNS = [(re.compile('^(ACHAT |PAIEMENT )?CARTE (?P<dd>\d{2})(?P<mm>\d{2})(?P<yy>\d{2}) (\d{2} )?(?P<text>.*)'),
FrenchTransaction.TYPE_CARD),
......
......@@ -26,9 +26,6 @@ from weboob.tools.browser import BasePage, BrowserIncorrectPassword
from weboob.tools.captcha.virtkeyboard import MappedVirtKeyboard
__all__ = ['LoginPage']
class VirtKeyboard(MappedVirtKeyboard):
symbols={'0':'40fdd263e99d7268b49e22e06b73ebf1',
'1':'0d53ac10dba67d3ec601a086d0881b6f',
......
......@@ -23,9 +23,6 @@ import urllib2
import re
__all__ = ['AuthenticationPage']
class BrowserAuthenticationCodeMaxLimit(BrowserIncorrectPassword):
pass
......
......@@ -24,9 +24,6 @@ from weboob.capabilities.messages import CantSendMessage
from weboob.tools.browser import BasePage
__all__ = ['ComposeFrame', 'ComposePage', 'ConfirmPage', 'SentPage']
class ComposeFrame(BasePage):
phone_regex = re.compile('^(\+33|0033|0)(6|7)(\d{8})$')
......
......@@ -21,9 +21,6 @@
from weboob.tools.browser import BasePage
__all__ = ['LoginPage', 'LoginSASPage']
class LoginPage(BasePage):
def login(self, login, password):
self.browser.select_form(name='code')
......
......@@ -25,9 +25,6 @@ from weboob.tools.capabilities.bank.transactions import FrenchTransaction
from weboob.tools.browser import BasePage
__all__ = ['AccountHistory', 'CardsList']
class Transaction(FrenchTransaction):
PATTERNS = [(re.compile(u'^(?P<category>CHEQUE)( N)? (?P<text>.*)'), FrenchTransaction.TYPE_CHECK),
(re.compile(r'^(?P<category>ACHAT CB) (?P<text>.*) (?P<dd>\d{2})\.(?P<mm>\d{2}).(?P<yy>\d{2}).*'),
......
......@@ -27,9 +27,6 @@ from weboob.tools.capabilities.bank.transactions import FrenchTransaction
from weboob.tools.ordereddict import OrderedDict
__all__ = ['AccountList']
class AccountList(BasePage):
def on_loaded(self):
self.accounts = OrderedDict()
......
......@@ -26,8 +26,6 @@ import lxml.etree as etree
from weboob.tools.browser import BasePage, BrowserUnavailable
from weboob.tools.captcha.virtkeyboard import VirtKeyboard
__all__ = ['LoginPage', 'BadLoginPage', 'AccountDesactivate', 'Initident', 'CheckPassword', 'repositionnerCheminCourant', 'UnavailablePage']
def md5(f):
md5 = hashlib.md5()
......
......@@ -25,9 +25,6 @@ from weboob.tools.browser import BasePage
from weboob.tools.misc import to_unicode
__all__ = ['TransferChooseAccounts', 'CompleteTransfer', 'TransferConfirm', 'TransferSummary']
class TransferChooseAccounts(BasePage):
def set_accouts(self, from_account, to_account):
self.browser.select_form(name="AiguillageForm")
......
......@@ -32,9 +32,6 @@ from weboob.capabilities.bank import Account
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
__all__ = ['LoginPage', 'LoginResultPage', 'AccountsPage', 'TransactionsPage', 'EmptyPage']
class LoginPage(BasePage):
def login(self, login, passwd):
self.browser.select_form(name='authen')
......@@ -93,7 +90,6 @@ class LoginResultPage(BasePage):
self.browser[tagName] = [value]
self.browser.submit()
def confirm(self):
self.browser.location('MainAuth?typeDemande=AC', no_login=True)
......
......@@ -2,8 +2,6 @@
from weboob.tools.browser import BasePage
__all__ = ['IndexPage']
class IndexPage(BasePage):
pass
......@@ -9,9 +9,6 @@ from weboob.capabilities.torrent import Torrent, MagnetOnly
from weboob.capabilities.base import NotAvailable
__all__ = ['TorrentsPage', 'TorrentPage']
class TorrentsPage(BasePage):
def iter_torrents(self):
......@@ -74,7 +71,6 @@ class TorrentPage(BasePage):
delta = timedelta(**{valueunit: float(valueago)})
date = datetime.now() - delta
files = []
for tr in trs[15:]:
files.append(unicode(tr.cssselect('td')[1].text))
......
......@@ -5,7 +5,6 @@ from weboob.capabilities.torrent import MagnetOnly
from random import choice
__all__ = ['BTDiggTest']
class BTDiggTest(BackendTest):
BACKEND = 'btdigg'
......
......@@ -26,9 +26,6 @@ from weboob.tools.browser import BasePage
from weboob.tools.misc import get_bytes_size
__all__ = ['TorrentsPage','TorrentPage']
class TorrentsPage(BasePage):
def iter_torrents(self):
for div in self.parser.select(self.document.getroot(),'div.list_tor'):
......
......@@ -32,9 +32,6 @@ from weboob.capabilities.bank import Account
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
__all__ = ['LoginPage', 'ErrorPage', 'IndexPage', 'UnavailablePage']
class _LogoutPage(BasePage):
def on_loaded(self):
try:
......@@ -244,8 +241,6 @@ class IndexPage(BasePage):
pass
self.browser.submit()
def go_history(self, info):
self.browser.select_form(name='main')
self.browser.set_all_readonly(False)
......
......@@ -27,8 +27,6 @@ from weboob.capabilities.image import BaseImage
from .video import CanalplusVideo
__all__ = ['ChannelsPage', 'VideoPage']
class ChannelsPage(BasePage):
def get_channels(self):
......
......@@ -21,9 +21,6 @@
from weboob.capabilities.video import BaseVideo
__all__ = ['CanalplusVideo']
class CanalplusVideo(BaseVideo):
swf_player = False
......
......@@ -28,9 +28,6 @@ from weboob.capabilities.bank import Account
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
__all__ = ['LoginPage', 'HomePage', 'TransactionsPage']
class LoginPage(HTMLPage):
def enter_login(self, username):
form = self.get_form(nr=0)
......
......@@ -23,8 +23,6 @@ from weboob.tools.browser2.filters import Filter, Link, CleanText, Format, Env,
from weboob.capabilities.job import BaseJobAdvert
__all__ = ['SearchPage']
class Child(Filter):
def filter(self, el):
......
......@@ -26,9 +26,6 @@ from weboob.capabilities import NotAvailable
from weboob.tools.browser import BasePage
__all__ = ['IndexPage', 'TrackPage']
class IndexPage(BasePage):
def track_package(self, _id):
self.browser.select_form(predicate=lambda form: form.attrs.get('id', '') == 'suivreEnvoi')
......
......@@ -27,9 +27,6 @@ from weboob.capabilities.bank import Account