add __all__ variable to many modules

This commit is contained in:
Christophe Benz 2010-04-16 18:02:03 +02:00
commit cebcead318
10 changed files with 38 additions and 2 deletions

View file

@ -25,7 +25,7 @@ from weboob.tools.parsers.lxmlhtmlparser import LxmlHtmlParser
from .pages import VideoPage from .pages import VideoPage
video_signature_regex = re.compile(r'&t=([^ ,&]*)') __all__ = ['YoutubeBrowser']
class YoutubeBrowser(BaseBrowser): class YoutubeBrowser(BaseBrowser):
video_signature_regex = re.compile(r'&t=([^ ,&]*)') video_signature_regex = re.compile(r'&t=([^ ,&]*)')

View file

@ -30,6 +30,10 @@ import weboob.backends
from weboob.backend import BaseBackend from weboob.backend import BaseBackend
from weboob.capabilities.cap import ICap from weboob.capabilities.cap import ICap
__all__ = ['Module']
class Module: class Module:
def __init__(self, name, module): def __init__(self, name, module):
self.name = name self.name = name

View file

@ -24,7 +24,11 @@ from logging import warning
from weboob.modules import ModulesLoader, BackendsConfig from weboob.modules import ModulesLoader, BackendsConfig
from weboob.scheduler import Scheduler from weboob.scheduler import Scheduler
class Weboob:
__all__ = ['Weboob']
class Weboob(object):
WORKDIR = os.path.join(os.path.expanduser('~'), '.weboob') WORKDIR = os.path.join(os.path.expanduser('~'), '.weboob')
BACKENDS_FILENAME = 'backends' BACKENDS_FILENAME = 'backends'

View file

@ -21,6 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import sched import sched
import time import time
__all__ = ['Scheduler']
class Scheduler(object): class Scheduler(object):
def __init__(self): def __init__(self):
self.scheduler = sched.scheduler(time.time, time.sleep) self.scheduler = sched.scheduler(time.time, time.sleep)

View file

@ -24,6 +24,10 @@ from optparse import OptionParser
from weboob import Weboob from weboob import Weboob
__all__ = ['BaseApplication']
class BaseApplication(object): class BaseApplication(object):
# Application name # Application name
APPNAME = '' APPNAME = ''

View file

@ -26,6 +26,10 @@ from weboob.modules import BackendsConfig
from .base import BaseApplication from .base import BaseApplication
__all__ = ['ConsoleApplication']
class ConsoleApplication(BaseApplication): class ConsoleApplication(BaseApplication):
def __init__(self): def __init__(self):
try: try:

View file

@ -28,6 +28,10 @@ from weboob.scheduler import Scheduler
from .console import ConsoleApplication from .console import ConsoleApplication
__all__ = ['PromptApplication']
class PromptScheduler(Scheduler): class PromptScheduler(Scheduler):
def __init__(self, prompt_cb, read_cb): def __init__(self, prompt_cb, read_cb):
self.scheduler = sched.scheduler(time.time, self.sleep) self.scheduler = sched.scheduler(time.time, self.sleep)

View file

@ -37,6 +37,11 @@ except ImportError, e:
else: else:
HAVE_COOKIES = True HAVE_COOKIES = True
__all__ = ['BrowserIncorrectPassword', 'BrowserBanned', 'BrowserUnavailable', 'BrowserRetry',
'BasePage', 'BaseBrowser', ]
# Exceptions # Exceptions
class BrowserIncorrectPassword(Exception): class BrowserIncorrectPassword(Exception):
pass pass

View file

@ -25,6 +25,10 @@ import yaml
from .iconfig import IConfig, ConfigError from .iconfig import IConfig, ConfigError
__all__ = ['YamlConfig']
class YamlConfig(IConfig): class YamlConfig(IConfig):
def __init__(self, path): def __init__(self, path):
self.path = path self.path = path

View file

@ -26,6 +26,9 @@ except ImportError, e:
from mechanize import CookieJar, Cookie from mechanize import CookieJar, Cookie
__all__ = ['FirefoxCookieJar']
class FirefoxCookieJar(CookieJar): class FirefoxCookieJar(CookieJar):
def __init__(self, domain, sqlite_file=None, policy=None): def __init__(self, domain, sqlite_file=None, policy=None):
CookieJar.__init__(self, policy) CookieJar.__init__(self, policy)