diff --git a/modules/banqueaccord/module.py b/modules/banqueaccord/module.py index c9d68e1be4eee59e8091100fd4ca35c90f002d7a..5310cb96dd87600aa5a2179bd0748e5ce09133c6 100644 --- a/modules/banqueaccord/module.py +++ b/modules/banqueaccord/module.py @@ -46,7 +46,7 @@ def create_default_browser(self): self.config['password'].get()) def iter_accounts(self): - return self.browser.get_accounts_list() + return self.browser.get_accounts_list() def get_account(self, _id): return find_object(self.browser.get_accounts_list(), id=_id, error=AccountNotFound) diff --git a/modules/banquepopulaire/pages.py b/modules/banquepopulaire/pages.py index 9fbbf5f09f7aa95593e46120073828145c2927ec..ab7785865226a1c81465ce3c896308fbdff9be86 100644 --- a/modules/banquepopulaire/pages.py +++ b/modules/banquepopulaire/pages.py @@ -452,7 +452,7 @@ def get_account_history(self): # XXX Fucking hack to include the check number not displayed in the full label. if re.match("^CHEQUE ", t.label): - t.label = 'CHEQUE No: %s' % self.parser.tocleanstring(tds[self.COL_REF]) + t.label = 'CHEQUE No: %s' % self.parser.tocleanstring(tds[self.COL_REF]) yield t diff --git a/modules/canalplus/browser.py b/modules/canalplus/browser.py index 107fbd729014e24bb1160fdfa7ae14d5e0be9ee5..fd06e89c7751bf154e6e12b6c184e3ceaef23a82 100644 --- a/modules/canalplus/browser.py +++ b/modules/canalplus/browser.py @@ -95,7 +95,7 @@ def iter_resources(self, split_path): elif len(split_path) == 1: for channel in channels: if channel.path_level == 2 and split_path == channel.parent_path: - yield channel + yield channel elif len(split_path) == 2: subchannels = self.iter_resources(split_path[0:1]) try: diff --git a/modules/cmb/module.py b/modules/cmb/module.py index a4cc56798e02f204c75d5c3649ec9c0b4736d52c..7f81af78a7d7c88720bf33345ed83fdad631d51c 100644 --- a/modules/cmb/module.py +++ b/modules/cmb/module.py @@ -99,8 +99,8 @@ def login(self): response = self.browser.open("https://www.cmb.fr/domiweb/servlet/Identification", allow_redirects=False, data=data) if response.status_code == 302: - self.islogged=True - return True + self.islogged=True + return True else: raise BrowserIncorrectPassword() return False diff --git a/modules/imdb/pages.py b/modules/imdb/pages.py index e5ac59aa0b4d94030c9e173d2bb999fa6a78ae13..84781187e94878d455c1f3294d1281ad8e287a0f 100644 --- a/modules/imdb/pages.py +++ b/modules/imdb/pages.py @@ -117,7 +117,7 @@ def iter_persons(self, role_filter=None): person = Person(id, name) person.short_description = role_detail yield person - # yield self.browser.get_person(id) + # yield self.browser.get_person(id) def iter_persons_ids(self): tables = self.parser.select(self.document.getroot(), 'table.cast_list') diff --git a/modules/ing/pages/accounts_list.py b/modules/ing/pages/accounts_list.py index c6693c55ff6ab06109c87898eb0acd6e4a23376d..e12ff691415ca7532db47f2b8336930f32dc3fbd 100644 --- a/modules/ing/pages/accounts_list.py +++ b/modules/ing/pages/accounts_list.py @@ -162,7 +162,7 @@ class get_transactions_cc(generic_transactions): @method class get_transactions_others(generic_transactions): - item_xpath = '//table' + item_xpath = '//table' def get_history_jid(self): span = self.doc.xpath('//span[@id="index:panelASV"]') diff --git a/modules/jvmalin/pages.py b/modules/jvmalin/pages.py index ad567a51943aa23e715b5296bb39db8c8cafd208..ca915184de7715529e642ed98e6ac2f8465166b2 100644 --- a/modules/jvmalin/pages.py +++ b/modules/jvmalin/pages.py @@ -21,7 +21,7 @@ def search(self, departure, arrival, departure_time, arrival_time): for form in self.browser.forms(): try: if form.attrs['id'] == 'rech-iti': - match = i + match = i except KeyError: pass i += 1 diff --git a/modules/nectarine/module.py b/modules/nectarine/module.py index ff3086c8bc1532015a490200d2a564c6fc48fe77..0d0cb7a5566231ff84e85820d61d3be5fb5d9ee4 100644 --- a/modules/nectarine/module.py +++ b/modules/nectarine/module.py @@ -53,9 +53,9 @@ def iter_radios_search(self, pattern): def get_radio(self, radio): if not isinstance(radio, Radio): - for rad in self.browser.iter_radios_list(): - if rad.id == radio: - return rad + for rad in self.browser.iter_radios_list(): + if rad.id == radio: + return rad return None def fill_radio(self, radio, fields): diff --git a/modules/nihonnooto/module.py b/modules/nihonnooto/module.py index 76bf4209459f75d836905ffac0e438a2465d5363..5a50b180a19f9bb826bcc40fb5001b9d81f5892a 100644 --- a/modules/nihonnooto/module.py +++ b/modules/nihonnooto/module.py @@ -54,9 +54,9 @@ def iter_radios_search(self, pattern): def get_radio(self, radio): if not isinstance(radio, Radio): - for rad in self.browser.iter_radios_list(): - if rad.id == radio: - return rad + for rad in self.browser.iter_radios_list(): + if rad.id == radio: + return rad return None def fill_radio(self, radio, fields): diff --git a/modules/okc/browser.py b/modules/okc/browser.py index ad43044a29faba8e7e33ad09731f1f9681309d9c..c86b6db21b9f2fa17d3d3d7ee11ce9f7161985c3 100644 --- a/modules/okc/browser.py +++ b/modules/okc/browser.py @@ -126,8 +126,8 @@ def get_my_name(self): @check_login def get_visits(self): - self.location('http://m.okcupid.com/visitors') - return self.page.get_visits() + self.location('http://m.okcupid.com/visitors') + return self.page.get_visits() @check_login def get_threads_list(self): diff --git a/modules/opacwebaloes/browser.py b/modules/opacwebaloes/browser.py index 6f944eaa78133eb60637399a18d6347159f05d75..fc2ed81c6c5e78fbcf3f2bfdc6dd7766a81011f2 100644 --- a/modules/opacwebaloes/browser.py +++ b/modules/opacwebaloes/browser.py @@ -61,7 +61,7 @@ def login(self): 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()): - raise BrowserIncorrectPassword() + raise BrowserIncorrectPassword() def get_rented_books_list(self): if not self.is_on_page(RentedPage): diff --git a/modules/paypal/browser.py b/modules/paypal/browser.py index f24f39bb3bd1d0f8ea05772fea971b119b6e0f62..acbf5a15ecd4cace9d1e10639a5c371c3b296b7f 100644 --- a/modules/paypal/browser.py +++ b/modules/paypal/browser.py @@ -112,7 +112,7 @@ def fetch_fn(start, end): step_min=step_min, step_max=step_max, fetch_fn=fetch_fn): - yield i + yield i except CSVAlreadyAsked: for i in self.download_last_history(account): yield i diff --git a/modules/voyagessncf/pages.py b/modules/voyagessncf/pages.py index df57d572c747c06249b9ec71eb69f94465a9c513..564fc51354dd42bdbb9d8caa1f8fe297a41be451 100644 --- a/modules/voyagessncf/pages.py +++ b/modules/voyagessncf/pages.py @@ -35,8 +35,8 @@ def on_loaded(self): class CitiesPage(Page): def get_stations(self): - result = json.loads(self.document[self.document.find('{'):-2]) - return result['CITIES'] + result = json.loads(self.document[self.document.find('{'):-2]) + return result['CITIES'] class SearchPage(Page): diff --git a/weboob/tools/application/base.py b/weboob/tools/application/base.py index 552d2d46b9cbfc254d76b10d775ac36ba57a8606..d7eb3c1354178dc282f999c38802f3d45e4ae5cf 100644 --- a/weboob/tools/application/base.py +++ b/weboob/tools/application/base.py @@ -283,7 +283,7 @@ def _do_complete_iter(self, backend, count, fields, res): sub = self._do_complete_obj(backend, fields, sub) if self.condition and self.condition.limit and \ self.condition.limit == i: - return + return if self.condition and not self.condition.is_valid(sub): modif += 1 diff --git a/weboob/tools/application/media_player.py b/weboob/tools/application/media_player.py index 6f319ad076d1447231c89b206c88c1cceac846e5..0e916c89dcaa6ac8179dab9af962be4681c220a8 100644 --- a/weboob/tools/application/media_player.py +++ b/weboob/tools/application/media_player.py @@ -96,7 +96,7 @@ def _play_default(self, media, player_name, args=None): """ # if flag play_proxy... if hasattr(media, '_play_proxy') and media._play_proxy == True: - # use urllib2 to handle redirect and cookies + # use urllib2 to handle redirect and cookies self._play_proxy(media, player_name, args) return None diff --git a/weboob/tools/backend.py b/weboob/tools/backend.py index f78eecf588763c1c3a55b964c118af60e382e139..2802a7e7bf2f90fb0aa4ef9a8dd73b0e2ca46443 100644 --- a/weboob/tools/backend.py +++ b/weboob/tools/backend.py @@ -335,9 +335,9 @@ def create_browser(self, *args, **kwargs): if any((tmpproxy, tmpproxys)): kwargs['proxy'] = {} if tmpproxy is not None: - kwargs['proxy']['http'] = tmpproxy + kwargs['proxy']['http'] = tmpproxy if tmpproxys is not None: - kwargs['proxy']['https'] = tmpproxys + kwargs['proxy']['https'] = tmpproxys kwargs['logger'] = self.logger