diff --git a/contrib/downloadboob/downloadboob.py b/contrib/downloadboob/downloadboob.py index 8830768a2988e79b884560705a79421f684186f4..babce1c4706e5018a7e78210d73fb03059b19b02 100755 --- a/contrib/downloadboob/downloadboob.py +++ b/contrib/downloadboob/downloadboob.py @@ -136,7 +136,6 @@ def get_filename(self, video, relative=False): return u"%s/%s.%s" % (directory, removeNonAscii(video.id), ext) - def get_linkname(self, video): if not os.path.exists(self.links_directory): os.makedirs(self.links_directory) @@ -151,12 +150,10 @@ def get_linkname(self, video): return u"%s/%s (%s).%s" % (self.links_directory, removeSpecial(video.title), removeSpecial(misc), ext) - def is_downloaded(self, video): # check if the file is 0 byte return os.path.isfile(self.get_filename(video)) - def remove_download(self, video): path = self.get_filename(video) if os.stat(path).st_size == 0: @@ -169,7 +166,6 @@ def remove_download(self, video): with open(path, 'w'): pass - def set_linkname(self, video): linkname = self.get_linkname(video) idname = self.get_filename(video, relative=True) @@ -178,7 +174,6 @@ def set_linkname(self, video): print "%s -> %s" % (linkname, idname) os.symlink(idname, linkname) - def do_download(self, video): if not video: print >>sys.stderr, 'Video not found: %s' % video diff --git a/modules/bnporc/perso/login.py b/modules/bnporc/perso/login.py index be64719bcedc4ff7ff876eeeb5bbbd2f3d688560..0a560e1264a9e49c1b7602367b72acb49bc73d82 100644 --- a/modules/bnporc/perso/login.py +++ b/modules/bnporc/perso/login.py @@ -61,7 +61,6 @@ def get_string_code(self,string): return code - class LoginPage(BasePage): def on_loaded(self): for td in self.document.getroot().cssselect('td.LibelleErreur'): @@ -128,7 +127,6 @@ def change_password(self, current, new): cookiejar.set_cookie(c) - code_current=vk.get_string_code(current) code_new=vk.get_string_code(new) diff --git a/modules/boursorama/pages/account_history.py b/modules/boursorama/pages/account_history.py index faa3c84b102648a4e6493e2c6963b22094ee4331..7b1aa6aea92f7d224a4347bc9125a42c83893681 100644 --- a/modules/boursorama/pages/account_history.py +++ b/modules/boursorama/pages/account_history.py @@ -27,7 +27,6 @@ from weboob.tools.capabilities.bank.transactions import FrenchTransaction - __all__ = ['AccountHistory'] class Transaction(FrenchTransaction): diff --git a/modules/cmb/backend.py b/modules/cmb/backend.py index 28723cdaab1ca258947b56926f4119b1f5da1d52..6ca85061eef123c3b8246ff5102333ab325c3ec7 100644 --- a/modules/cmb/backend.py +++ b/modules/cmb/backend.py @@ -45,7 +45,6 @@ __all__ = ['CmbBackend'] - class CmbBackend(BaseBackend, ICapBank): NAME = 'cmb' MAINTAINER = u'Johann Broudin' @@ -98,8 +97,6 @@ class CmbBackend(BaseBackend, ICapBank): ) ] - - cookie = None headers = { 'User-Agent': @@ -197,7 +194,6 @@ def do_http(): account._cmbvaleur2 = m.group(2) account._cmbtype = m.group(3) - balance = u''.join([txt.strip() for txt in td[2].itertext()]) balance = balance.replace(',', '.').replace(u"\xa0", '') account.balance = Decimal(balance) @@ -252,7 +248,6 @@ def do_http(): parser = etree.HTMLParser() tree = etree.parse(StringIO(data), parser) - tables = tree.xpath('/html/body/table') if len(tables) == 0: title = tree.xpath('/html/head/title')[0].text @@ -275,7 +270,7 @@ def do_http(): continue for tr in table.getiterator('tr'): if (tr.get('class') != 'LnTit' and - tr.get('class') != 'LnTot'): + tr.get('class') != 'LnTot'): operation = Transaction(i) td = tr.xpath('td') diff --git a/modules/cmb/hellhttp.py b/modules/cmb/hellhttp.py index 4d58832cd71c74db9ec243cbe124629e374ca4eb..f75594719907740bf50ccfc209070df3eda91f52 100644 --- a/modules/cmb/hellhttp.py +++ b/modules/cmb/hellhttp.py @@ -34,7 +34,6 @@ class HTTPSVerifiedConnection(httplib.HTTPSConnection): This class allows communication via SSL, and will checks certificates """ - def __init__(self, host, port=None, key_file=None, cert_file=None, ca_file=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, callBack=None): diff --git a/modules/creditcooperatif/pro/pages.py b/modules/creditcooperatif/pro/pages.py index dc743bf6f28e9ed041fbea5e645368971ff3c958..1d30d131b1b4c90efc68e4996b4d3337140bdc57 100644 --- a/modules/creditcooperatif/pro/pages.py +++ b/modules/creditcooperatif/pro/pages.py @@ -159,7 +159,6 @@ def get_content(td): else: date += "/%d" % time.localtime().tm_year - t = Transaction(date+""+raw) t.parse(date, re.sub(r'[ ]+', ' ', raw)) t.set_amount("", debit) diff --git a/modules/dresdenwetter/pages.py b/modules/dresdenwetter/pages.py index c6a9ee4d1f22ab2df0b1b5ffcef9115b7b312868..b4faae81ea1bf4e322f14ac0401b39e2db850402 100644 --- a/modules/dresdenwetter/pages.py +++ b/modules/dresdenwetter/pages.py @@ -30,7 +30,6 @@ class StartPage(BasePage): u"Niederschlag", u"Globalstrahlung", u"Schneehoehe"] unit = [u"°C", u"km/h", u"hPa", u"%", u"mm", u"W/m²", u"cm"] - def get_sensors_list(self): paraphs = self.document.xpath('//p[@align="center"]') sensors = [] diff --git a/modules/europarl/pages.py b/modules/europarl/pages.py index 19eaf3352e3f304d01cb61a11f6dd3d7647bb37e..9e5378f3de2f364f695842aba82e7e515742d41c 100644 --- a/modules/europarl/pages.py +++ b/modules/europarl/pages.py @@ -32,7 +32,6 @@ from .video import EuroparlVideo - __all__ = ['VideoPage'] class VideoPage(BasePage): diff --git a/modules/gdcvault/pages.py b/modules/gdcvault/pages.py index 73ac80a782f2b8774b1f0fd69f7dcd4dd1be1415..44316f9c969b7007ed480e156d5052025e300f25 100644 --- a/modules/gdcvault/pages.py +++ b/modules/gdcvault/pages.py @@ -35,8 +35,6 @@ #import lxml.etree - - __all__ = ['VideoPage'] class VideoPage(BasePage): diff --git a/modules/googletranslate/backend.py b/modules/googletranslate/backend.py index 588cf711a4310a68390d0e9a3d629d14ed04d334..6d37858dd44741fdb1bd03a41c917e018f20d9aa 100644 --- a/modules/googletranslate/backend.py +++ b/modules/googletranslate/backend.py @@ -48,7 +48,6 @@ class GoogleTranslateBackend(BaseBackend, ICapTranslate): 'Telugu':'te', 'Thai':'th', 'Turkish':'tr', 'Ukrainian':'uk', 'Urdu':'ur', 'Vietnamese':'vi', 'Welsh':'cy', 'Yiddish':'yi', } - def translate(self, lan_from, lan_to, text): if not lan_from in self.GOOGLELANGUAGE.keys(): raise LanguageNotSupported() diff --git a/modules/ing/pages/login.py b/modules/ing/pages/login.py index 24cc13cbef738ee06553b04cd0709a8bff9fc745..89877a03efd82d07bbc810d0f7662044df848f29 100644 --- a/modules/ing/pages/login.py +++ b/modules/ing/pages/login.py @@ -103,7 +103,6 @@ def error(self): err = self.document.find('//span[@class="error"]') return err is not None - def login(self, password): # 2) And now, the virtual Keyboard try: diff --git a/modules/inrocks/browser.py b/modules/inrocks/browser.py index 3f0fff3a7306ecd61b34a634de0534fefd880606..97563c75f9a2a032c2ba993ce6c6c86c1cd82b65 100644 --- a/modules/inrocks/browser.py +++ b/modules/inrocks/browser.py @@ -23,7 +23,6 @@ from weboob.tools.browser import BaseBrowser - class NewspaperInrocksBrowser(BaseBrowser): "NewspaperInrocksBrowser class" PAGES = { diff --git a/modules/marmiton/pages.py b/modules/marmiton/pages.py index 11c077a2d1ba76581af70135ab1a0f2fbbba15e6..e6ed295ea51a024e1b65b50e2cfdd0a61b65a287 100644 --- a/modules/marmiton/pages.py +++ b/modules/marmiton/pages.py @@ -55,7 +55,6 @@ def iter_recipes(self): yield recipe - class RecipePage(BasePage): """ Page which contains a recipe """ diff --git a/modules/newsfeed/backend.py b/modules/newsfeed/backend.py index 3d6c8263d49e9760180254dcf4deadb2a7f2d10e..16bb6d45b9ffe3a46159ff6688beb1157d2a9071 100644 --- a/modules/newsfeed/backend.py +++ b/modules/newsfeed/backend.py @@ -37,7 +37,6 @@ class NewsfeedBackend(BaseBackend, ICapMessages): CONFIG = BackendConfig(Value('url', label="Atom/RSS feed's url", regexp='https?://.*')) STORAGE = {'seen': []} - def iter_threads(self): for article in Newsfeed(self.config['url'].get()).iter_entries(): yield self.get_thread(article.id, article) @@ -75,15 +74,12 @@ def get_thread(self, id, entry=None): flags=flags) return thread - - def iter_unread_messages(self): for thread in self.iter_threads(): for m in thread.iter_all_messages(): if m.flags & m.IS_UNREAD: yield m - def set_message_read(self, message): self.storage.get('seen', default=[]).append(message.thread.id) self.storage.save() diff --git a/modules/okc/browser.py b/modules/okc/browser.py index 714db4df9decd05defe853763baa78169fd96bca..57e6acce2f3c632e22dae4a08d257e39ec6ae434 100644 --- a/modules/okc/browser.py +++ b/modules/okc/browser.py @@ -44,7 +44,6 @@ class OkCBrowser(BaseBrowser): ('http://%s/profile/[^/]*' % DOMAIN, ProfilePage), )) - logged_in = False def home(self): diff --git a/modules/opacwebaloes/browser.py b/modules/opacwebaloes/browser.py index 02fa64b186d215a0603b5102da4514c1b8c218fe..3daea7c9f9c6cf17752e449978f026ab655d4b88 100644 --- a/modules/opacwebaloes/browser.py +++ b/modules/opacwebaloes/browser.py @@ -60,7 +60,7 @@ def login(self): no_login=True) if not self.page.login(self.username, self.password) or \ not self.is_logged() or \ - (self.is_on_page(LoginPage) and self.page.is_error()): + (self.is_on_page(LoginPage) and self.page.is_error()): raise BrowserIncorrectPassword() def get_rented_books_list(self): diff --git a/modules/opensubtitles/pages.py b/modules/opensubtitles/pages.py index 349964edcb9302c6a40cc76818c49d1a1cb2d6c8..e7b90d19df98c80babc4b5b5c3556c6fe3d89102 100644 --- a/modules/opensubtitles/pages.py +++ b/modules/opensubtitles/pages.py @@ -101,7 +101,6 @@ def get_subtitle_from_line(self,line): return subtitle - class SubtitlePage(BasePage): """ Page which contains a single subtitle for a movie """ diff --git a/modules/parolesmania/test.py b/modules/parolesmania/test.py index 65cc832a46cb727ed45d09f8196672f00040df8f..19a70d6fff3de9f2dd8c409bc1efafcbfa566d77 100644 --- a/modules/parolesmania/test.py +++ b/modules/parolesmania/test.py @@ -36,7 +36,6 @@ def test_search_song_n_get(self): assert full_lyr.artist assert full_lyr.content is not NotLoaded - def test_search_artist(self): l_lyrics = list(self.backend.iter_lyrics('artist','boris')) for songlyrics in l_lyrics: diff --git a/modules/parolesmusique/test.py b/modules/parolesmusique/test.py index 96e5692700b2f325c597b313174524c2ab0c7f9b..a9b2a9f367e6bd2e7fa23ff3f5b1a8311bb779b8 100644 --- a/modules/parolesmusique/test.py +++ b/modules/parolesmusique/test.py @@ -36,7 +36,6 @@ def test_search_song_n_get(self): assert full_lyr.artist assert full_lyr.content is not NotLoaded - def test_search_artist(self): l_lyrics = list(self.backend.iter_lyrics('artist','boris')) for songlyrics in l_lyrics: diff --git a/modules/redmine/pages/wiki.py b/modules/redmine/pages/wiki.py index 48c1a265b865afbcde45413f7d7b1f08c4c5bdb4..27fa4bef91c0d10fb28b34c01e8b08aa32a32929 100644 --- a/modules/redmine/pages/wiki.py +++ b/modules/redmine/pages/wiki.py @@ -37,6 +37,5 @@ def get_authenticity_token(self): return wiki_form.xpath('div/input')[0].get('value') - class WikiPage(BasePage): pass diff --git a/modules/sachsen/backend.py b/modules/sachsen/backend.py index 65f4d78f441c1417fcd5966d09ce046960a30d8b..54a310147e113d76ba45dd09aafa2ed46391533a 100644 --- a/modules/sachsen/backend.py +++ b/modules/sachsen/backend.py @@ -46,7 +46,7 @@ def iter_gauges(self, pattern=None): lowpattern = pattern.lower() for gauge in self.browser.get_rivers_list(): if lowpattern in gauge.name.lower()\ - or lowpattern in gauge.object.lower(): + or lowpattern in gauge.object.lower(): yield gauge def _get_gauge_by_id(self, id): diff --git a/modules/seeklyrics/test.py b/modules/seeklyrics/test.py index cbbe3a0c5ae65507d4868458118b830b0e93c86b..64a3a4ab67459633b64cdccb70ff3a4a63fe06e5 100644 --- a/modules/seeklyrics/test.py +++ b/modules/seeklyrics/test.py @@ -36,7 +36,6 @@ def test_search_song_n_get(self): assert full_lyr.artist assert full_lyr.content is not NotLoaded - def test_search_artist(self): l_lyrics = list(self.backend.iter_lyrics('artist','boris vian')) for songlyrics in l_lyrics: diff --git a/modules/sfr/pages/compose.py b/modules/sfr/pages/compose.py index a2d4d22f3be494d357ad4a1170ffd9381b6b370d..ec76774809db90e5498fd28cc94bf34bef652def 100644 --- a/modules/sfr/pages/compose.py +++ b/modules/sfr/pages/compose.py @@ -24,7 +24,6 @@ from weboob.tools.browser import BasePage - __all__ = ['ClosePage', 'ComposePage', 'ConfirmPage', 'SentPage'] diff --git a/modules/societegenerale/pages/accounts_list.py b/modules/societegenerale/pages/accounts_list.py index efbbad479113fae0a1ff32376e350e8f779bffc7..52cfaedfeb2b2ce9c08731c7a62827d9e489fb16 100644 --- a/modules/societegenerale/pages/accounts_list.py +++ b/modules/societegenerale/pages/accounts_list.py @@ -171,7 +171,6 @@ def iter_transactions(self, coming): sign=p['sign'][0], src=p['src'][0]) - def _iter_transactions(self, doc, coming): t = None for i, tr in enumerate(self.parser.select(doc.getroot(), 'tr')): diff --git a/modules/vimeo/pages.py b/modules/vimeo/pages.py index 6cf493f4c61820f32bee27b113722cf12382a9d3..06becb89001ffdadeb78f5a7fb3dad96fd0b9283 100644 --- a/modules/vimeo/pages.py +++ b/modules/vimeo/pages.py @@ -38,7 +38,6 @@ from .video import VimeoVideo - __all__ = ['VideoPage'] class VideoPage(BasePage): diff --git a/modules/weather/test.py b/modules/weather/test.py index bd2aa69b3377ce9df75f6441c7074f58914a2d62..49b826bacaeef676ce22850f97d44b21beaf6661 100644 --- a/modules/weather/test.py +++ b/modules/weather/test.py @@ -23,7 +23,6 @@ class WeatherTest(BackendTest): BACKEND = 'weather' - def test_cities(self): paris = self.backend.iter_city_search('crappything¶m=;drop database') self.assertTrue(len(list(paris)) == 0) diff --git a/weboob/applications/boobathon/boobathon.py b/weboob/applications/boobathon/boobathon.py index 4629a74003fefc518b7fadd037d128abfc4cd92c..adb8db63301e3559bae261b0c4c002adfe5258af 100644 --- a/weboob/applications/boobathon/boobathon.py +++ b/weboob/applications/boobathon/boobathon.py @@ -764,7 +764,6 @@ def do_cancel(self, line): print >>sys.stderr, "There isn't any task in progress." return 1 - def load_default_backends(self): """ Overload a BaseApplication method. diff --git a/weboob/applications/boobill/boobill.py b/weboob/applications/boobill/boobill.py index 7218a4206d61610873f4e49f6a975fbce0461afa..b40d6d5bbdfa313f00c9945dfd4bb9aded3130d1 100644 --- a/weboob/applications/boobill/boobill.py +++ b/weboob/applications/boobill/boobill.py @@ -181,7 +181,6 @@ def do_download(self, line): self.download_all(dest, names) return - if dest is None: for backend, bill in self.do('get_bill', id, backends=names): dest = id + "." + bill.format @@ -215,5 +214,4 @@ def download_all(self, id, names): print >>sys.stderr, 'Unable to write bill in "%s": %s' % (dest, e) return 1 - return diff --git a/weboob/applications/cineoob/cineoob.py b/weboob/applications/cineoob/cineoob.py index d03797ae383db71fade644f420be783a06c474b3..93f1a731ca53c019f683ebe0790231e681961004 100644 --- a/weboob/applications/cineoob/cineoob.py +++ b/weboob/applications/cineoob/cineoob.py @@ -559,7 +559,6 @@ def do_info_subtitle(self, id): self.format(subtitle) self.flush() - def complete_getfile_subtitle(self, text, line, *ignored): args = line.split(' ', 2) if len(args) == 2: diff --git a/weboob/applications/masstransit/masstransit.py b/weboob/applications/masstransit/masstransit.py index dc589f1a244ba5cf373d0d0de79838ac33fc74c2..f00fbfd61f4411a0da0551caf068425b711c8de4 100644 --- a/weboob/applications/masstransit/masstransit.py +++ b/weboob/applications/masstransit/masstransit.py @@ -132,7 +132,6 @@ def __init__(self, weboob): self.treestore = gtk.TreeStore(str, str, str, str, str) treeview = gtk.TreeView(self.treestore) - treeview.append_column( gtk.TreeViewColumn( 'Train', @@ -166,8 +165,6 @@ def __init__(self, weboob): text=4 )) - - vertical_box = gtk.VBox() vertical_box.pack_start(horizontal_box) horizontal_box.pack_start(self.retour_button) diff --git a/weboob/applications/qflatboob/main_window.py b/weboob/applications/qflatboob/main_window.py index 66e5cf759dc15831cf092d69bd8acafb8bb92b33..8f17165a80d9fa10e08841e7c4925613fba71d25 100644 --- a/weboob/applications/qflatboob/main_window.py +++ b/weboob/applications/qflatboob/main_window.py @@ -289,7 +289,6 @@ def setPhoto(self, housing, item): return False - def setHousing(self, housing, nottext='Loading...'): if self.housing is not None: self.saveNotes() diff --git a/weboob/applications/qhavedate/contacts.py b/weboob/applications/qhavedate/contacts.py index d758d43556a060a574da66ed02902bd25debd0ad..377eef7b103b71f1021bc6fe42afea517e93f58d 100644 --- a/weboob/applications/qhavedate/contacts.py +++ b/weboob/applications/qhavedate/contacts.py @@ -65,7 +65,6 @@ def set_message(self, message): content = message.content.replace('&', '&').replace('<', '<').replace('>', '>').replace('\n', '
') self.ui.contentLabel.setText(content) - def __eq__(self, m): if not isinstance(m, Message): return False @@ -199,8 +198,6 @@ def _postReply_eb(self, backend, error, backtrace): self.process_reply = None - - class ContactProfile(QWidget): def __init__(self, weboob, contact, parent=None): @@ -362,7 +359,6 @@ def __init__(self, weboob, contact, parent=None): self.connect(self.ui.saveButton, SIGNAL('clicked()'), self.saveNotes) - def _getNotes_cb(self, backend, data): if not backend or not data: self.process = None diff --git a/weboob/applications/qvideoob/main_window.py b/weboob/applications/qvideoob/main_window.py index 06141f7a2fd5f39f9925aeeea9bb2a1b342edba3..def9ded93d97a957dcb38581999b88f9cbacb9ab 100644 --- a/weboob/applications/qvideoob/main_window.py +++ b/weboob/applications/qvideoob/main_window.py @@ -87,7 +87,7 @@ def sfwChanged(self, state): def updateVideosDisplay(self): for minivideo in self.minivideos: if (minivideo.video.nsfw and self.ui.nsfwCheckBox.isChecked() or - not minivideo.video.nsfw and self.ui.sfwCheckBox.isChecked()): + not minivideo.video.nsfw and self.ui.sfwCheckBox.isChecked()): minivideo.show() else: minivideo.hide() @@ -119,7 +119,7 @@ def addVideo(self, backend, video): self.ui.scrollAreaContent.layout().addWidget(minivideo) self.minivideos.append(minivideo) if (video.nsfw and not self.ui.nsfwCheckBox.isChecked() or - not video.nsfw and not self.ui.sfwCheckBox.isChecked()): + not video.nsfw and not self.ui.sfwCheckBox.isChecked()): minivideo.hide() def openURL(self): diff --git a/weboob/applications/suboob/suboob.py b/weboob/applications/suboob/suboob.py index 6d5d7ee1e563beafca076eff2fb6f0e5b2516165..fcf4cb7472a3e548a983e9e540fe6c827a492483 100644 --- a/weboob/applications/suboob/suboob.py +++ b/weboob/applications/suboob/suboob.py @@ -118,7 +118,6 @@ def do_info(self, id): self.format(subtitle) self.flush() - def complete_getfile(self, text, line, *ignored): args = line.split(' ', 2) if len(args) == 2: diff --git a/weboob/core/repositories.py b/weboob/core/repositories.py index 758a0567b4ea747bbe3c7dded8e7f1e1ac8b2a20..ba58924cbbe6c7171ad7d641ac048c494070e478 100644 --- a/weboob/core/repositories.py +++ b/weboob/core/repositories.py @@ -639,7 +639,6 @@ def install(self, module, progress=IProgress()): except BrowserUnavailable, e: raise ModuleInstallError('Unable to fetch module: %s' % e) - # Check signature if module.signed and Keyring.find_gpgv(): progress.progress(0.5, 'Checking module authenticity...') @@ -651,7 +650,6 @@ def install(self, module, progress=IProgress()): if not keyring.is_valid(tardata, sig_data): raise ModuleInstallError('Invalid signature for %s.' % module.name) - # Extract module from tarball. if os.path.isdir(module_dir): shutil.rmtree(module_dir) diff --git a/weboob/tools/application/qt/backendcfg.py b/weboob/tools/application/qt/backendcfg.py index 5e29800ab09b86f306e532338dc3e46688408259..ff1873e7924de46efd90a3b59e320c050630c75c 100644 --- a/weboob/tools/application/qt/backendcfg.py +++ b/weboob/tools/application/qt/backendcfg.py @@ -381,7 +381,7 @@ def moduleSelectionChanged(self): ', '.join(sorted(cap.__name__.replace('ICap', '') for cap in module.iter_caps())))) if module.has_caps(ICapAccount) and self.ui.nameEdit.isEnabled() and \ - module.klass.ACCOUNT_REGISTER_PROPERTIES is not None: + module.klass.ACCOUNT_REGISTER_PROPERTIES is not None: self.ui.registerButton.show() else: self.ui.registerButton.hide() diff --git a/weboob/tools/application/repl.py b/weboob/tools/application/repl.py index 336a2d3cb40424b4792b4fe5bf938cf7579dd4ef..893e25901e03e7e23c73cc8348ad24f153aeab5a 100644 --- a/weboob/tools/application/repl.py +++ b/weboob/tools/application/repl.py @@ -330,7 +330,6 @@ def parseline(self, line): return cmd, arg, ignored - def onecmd(self, line): """ This REPL method is overrided to catch some particular exceptions.