pep8 blank lines fixes

flake8 --select W391,E302,E301,E304

autopep8 can't fix W391 even though it claims it can.
Fixed using a simple custom script.
This commit is contained in:
Laurent Bachelier 2014-10-10 23:04:08 +02:00
commit 448c06d125
142 changed files with 249 additions and 25 deletions

View file

@ -32,11 +32,13 @@ class ForeignPage(Page):
def on_loaded(self):
raise UserError('Your IP address is localized in a country not supported by this module (%s). Currently only the French website is supported.' % self.group_dict['country'])
class CitiesPage(Page):
def get_stations(self):
result = json.loads(self.document[self.document.find('{'):-2])
return result['CITIES']
class SearchPage(Page):
def search(self, departure, arrival, date, age, card, comfort_class):
self.browser.select_form(name='saisie')
@ -57,6 +59,7 @@ class SearchPage(Page):
self.browser['nbAnimalsForTravel'] = '0'
self.browser.submit()
class SearchErrorPage(Page):
def on_loaded(self):
p = self.document.getroot().cssselect('div.messagesError p')
@ -64,11 +67,13 @@ class SearchErrorPage(Page):
message = p[0].text.strip()
raise UserError(message)
class SearchInProgressPage(Page):
def on_loaded(self):
link = self.document.xpath('//a[@id="url_redirect_proposals"]')[0]
self.browser.location(link.attrib['href'])
class ResultsPage(Page):
def get_value(self, div, name, last=False):
i = -1 if last else 0