diff --git a/modules/banqueaccord/module.py b/modules/banqueaccord/module.py index c9d68e1b..5310cb96 100644 --- a/modules/banqueaccord/module.py +++ b/modules/banqueaccord/module.py @@ -46,7 +46,7 @@ class BanqueAccordModule(Module, CapBank): 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 9fbbf5f0..ab778586 100644 --- a/modules/banquepopulaire/pages.py +++ b/modules/banquepopulaire/pages.py @@ -452,7 +452,7 @@ class TransactionsPage(BasePage): # 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 107fbd72..fd06e89c 100644 --- a/modules/canalplus/browser.py +++ b/modules/canalplus/browser.py @@ -95,7 +95,7 @@ class CanalplusBrowser(Browser): 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 a4cc5679..7f81af78 100644 --- a/modules/cmb/module.py +++ b/modules/cmb/module.py @@ -99,8 +99,8 @@ class CmbModule(Module, CapBank): 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 e5ac59aa..84781187 100644 --- a/modules/imdb/pages.py +++ b/modules/imdb/pages.py @@ -117,7 +117,7 @@ class MovieCrewPage(Page): 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 c6693c55..e12ff691 100644 --- a/modules/ing/pages/accounts_list.py +++ b/modules/ing/pages/accounts_list.py @@ -162,7 +162,7 @@ class AccountsList(LoggedPage, HTMLPage): @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 ad567a51..ca915184 100644 --- a/modules/jvmalin/pages.py +++ b/modules/jvmalin/pages.py @@ -21,7 +21,7 @@ class RoadmapSearchPage(Page): 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 ff3086c8..0d0cb7a5 100644 --- a/modules/nectarine/module.py +++ b/modules/nectarine/module.py @@ -53,9 +53,9 @@ class NectarineModule(Module, CapRadio, CapCollection): 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 76bf4209..5a50b180 100644 --- a/modules/nihonnooto/module.py +++ b/modules/nihonnooto/module.py @@ -54,9 +54,9 @@ class NihonNoOtoModule(Module, CapRadio, CapCollection): 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 ad43044a..c86b6db2 100644 --- a/modules/okc/browser.py +++ b/modules/okc/browser.py @@ -126,8 +126,8 @@ class OkCBrowser(Browser): @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 6f944eaa..fc2ed81c 100644 --- a/modules/opacwebaloes/browser.py +++ b/modules/opacwebaloes/browser.py @@ -61,7 +61,7 @@ class AloesBrowser(Browser): 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 f24f39bb..acbf5a15 100644 --- a/modules/paypal/browser.py +++ b/modules/paypal/browser.py @@ -112,7 +112,7 @@ class Paypal(Browser): 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 df57d572..564fc513 100644 --- a/modules/voyagessncf/pages.py +++ b/modules/voyagessncf/pages.py @@ -35,8 +35,8 @@ class ForeignPage(Page): 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 552d2d46..d7eb3c13 100644 --- a/weboob/tools/application/base.py +++ b/weboob/tools/application/base.py @@ -283,7 +283,7 @@ class Application(object): 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 6f319ad0..0e916c89 100644 --- a/weboob/tools/application/media_player.py +++ b/weboob/tools/application/media_player.py @@ -96,7 +96,7 @@ class MediaPlayer(object): """ # 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 f78eecf5..2802a7e7 100644 --- a/weboob/tools/backend.py +++ b/weboob/tools/backend.py @@ -335,9 +335,9 @@ class Module(object): 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