pep8 cleaning
This commit is contained in:
parent
a8167c9dd6
commit
b8227b69b1
2 changed files with 4 additions and 9 deletions
|
|
@ -70,7 +70,6 @@ class FreeMobileBackend(BaseBackend, ICapBill):
|
||||||
for history in self.browser.get_history(subscription):
|
for history in self.browser.get_history(subscription):
|
||||||
yield history
|
yield history
|
||||||
|
|
||||||
|
|
||||||
def get_bill(self, id):
|
def get_bill(self, id):
|
||||||
with self.browser:
|
with self.browser:
|
||||||
bill = self.browser.get_bill(id)
|
bill = self.browser.get_bill(id)
|
||||||
|
|
@ -79,7 +78,6 @@ class FreeMobileBackend(BaseBackend, ICapBill):
|
||||||
else:
|
else:
|
||||||
raise BillNotFound()
|
raise BillNotFound()
|
||||||
|
|
||||||
|
|
||||||
def iter_bills(self, subscription):
|
def iter_bills(self, subscription):
|
||||||
if not isinstance(subscription, Subscription):
|
if not isinstance(subscription, Subscription):
|
||||||
subscription = self.get_subscription(subscription)
|
subscription = self.get_subscription(subscription)
|
||||||
|
|
@ -88,7 +86,6 @@ class FreeMobileBackend(BaseBackend, ICapBill):
|
||||||
for bill in self.browser.iter_bills(subscription.id):
|
for bill in self.browser.iter_bills(subscription.id):
|
||||||
yield bill
|
yield bill
|
||||||
|
|
||||||
|
|
||||||
def get_details(self, subscription):
|
def get_details(self, subscription):
|
||||||
if not isinstance(subscription, Subscription):
|
if not isinstance(subscription, Subscription):
|
||||||
subscription = self.get_subscription(subscription)
|
subscription = self.get_subscription(subscription)
|
||||||
|
|
@ -97,7 +94,6 @@ class FreeMobileBackend(BaseBackend, ICapBill):
|
||||||
for detail in self.browser.get_details(subscription):
|
for detail in self.browser.get_details(subscription):
|
||||||
yield detail
|
yield detail
|
||||||
|
|
||||||
|
|
||||||
def download_bill(self, bill):
|
def download_bill(self, bill):
|
||||||
if not isinstance(bill, Bill):
|
if not isinstance(bill, Bill):
|
||||||
bill = self.get_bill(bill)
|
bill = self.get_bill(bill)
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ class DetailsPage(BasePage):
|
||||||
virtualnumber = div.attrib['onclick'].split('(')[1][1]
|
virtualnumber = div.attrib['onclick'].split('(')[1][1]
|
||||||
self.details['num' + str(phonenumber)] = virtualnumber
|
self.details['num' + str(phonenumber)] = virtualnumber
|
||||||
|
|
||||||
|
|
||||||
for div in self.document.xpath('//div[@class="infosConso"]'):
|
for div in self.document.xpath('//div[@class="infosConso"]'):
|
||||||
num = div.attrib['id'].split('_')[1][0]
|
num = div.attrib['id'].split('_')[1][0]
|
||||||
self.details[num] = []
|
self.details[num] = []
|
||||||
|
|
@ -146,7 +145,7 @@ class HistoryPage(BasePage):
|
||||||
self.calls = []
|
self.calls = []
|
||||||
for tr in self.document.xpath('//tr'):
|
for tr in self.document.xpath('//tr'):
|
||||||
tds = tr.xpath('td')
|
tds = tr.xpath('td')
|
||||||
if tds[0].text == None or tds[0].text == "Date":
|
if tds[0].text is None or tds[0].text == "Date":
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
detail = Detail()
|
detail = Detail()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue