Fix PEP8 E713

This commit is contained in:
Laurent Bachelier 2015-08-07 16:35:41 +02:00
commit f7115f5f69
8 changed files with 8 additions and 8 deletions

View file

@ -101,7 +101,7 @@ class ProAccountHistory(Page):
except IndexError: except IndexError:
return return
if not 'checked' in checkbox.attrib: if 'checked' not in checkbox.attrib:
self.browser.select_form(name='formtri') self.browser.select_form(name='formtri')
self.browser['szTriDate'] = ['date'] self.browser['szTriDate'] = ['date']
self.browser['szTriRub'] = [] self.browser['szTriRub'] = []

View file

@ -51,7 +51,7 @@ class JsonBrowserMixin(object):
def open(self, *args, **kwargs): def open(self, *args, **kwargs):
if isJSON(kwargs.get('data')): if isJSON(kwargs.get('data')):
kwargs['data'] = json.dumps(kwargs['data'][1]) kwargs['data'] = json.dumps(kwargs['data'][1])
if not 'headers' in kwargs: if 'headers' not in kwargs:
kwargs['headers'] = {} kwargs['headers'] = {}
kwargs['headers']['Content-Type'] = 'application/json' kwargs['headers']['Content-Type'] = 'application/json'

View file

@ -116,5 +116,5 @@ class AccountsList(Page):
account.balance = Decimal(0) account.balance = Decimal(0)
else: else:
# because of some weird useless <tr> # because of some weird useless <tr>
if account.id is not None and (not account._link_id or not 'moneycenter' in account._link_id): if account.id is not None and (not account._link_id or 'moneycenter' not in account._link_id):
yield account yield account

View file

@ -89,7 +89,7 @@ class BredBrowser(DomainBrowser):
a.currency = poste['montantTitres']['monnaie']['code'].strip() a.currency = poste['montantTitres']['monnaie']['code'].strip()
yield a yield a
if not 'libelle' in poste: if 'libelle' not in poste:
continue continue
a.label = ' '.join([content['intitule'].strip(), poste['libelle'].strip()]) a.label = ' '.join([content['intitule'].strip(), poste['libelle'].strip()])

View file

@ -233,7 +233,7 @@ class AccountHistoryPage(LoggedPage, HTMLPage):
return self.parent.get_colnum('date') is not None and \ return self.parent.get_colnum('date') is not None and \
len(self.el.findall('td')) >= 3 and \ len(self.el.findall('td')) >= 3 and \
self.el.get('class') and \ self.el.get('class') and \
not 'tableTr' in self.el.get('class') 'tableTr' not in self.el.get('class')
def validate(self, obj): def validate(self, obj):
if obj.category == 'RELEVE CB': if obj.category == 'RELEVE CB':

View file

@ -98,7 +98,7 @@ class TinderModule(Module, CapMessages, CapMessagesPost, CapDating):
def iter_threads(self): def iter_threads(self):
for thread in self.browser.get_threads(): for thread in self.browser.get_threads():
if not 'person' in thread: if 'person' not in thread:
# The account has been removed, probably because it was a # The account has been removed, probably because it was a
# spammer. # spammer.
continue continue

View file

@ -794,7 +794,7 @@ class APIBrowser(DomainBrowser):
def open(self, *args, **kwargs): def open(self, *args, **kwargs):
if 'data' in kwargs: if 'data' in kwargs:
kwargs['data'] = json.dumps(kwargs['data']) kwargs['data'] = json.dumps(kwargs['data'])
if not 'headers' in kwargs: if 'headers' not in kwargs:
kwargs['headers'] = {} kwargs['headers'] = {}
kwargs['headers']['Content-Type'] = 'application/json' kwargs['headers']['Content-Type'] = 'application/json'

View file

@ -298,7 +298,7 @@ class TableElement(ListElement):
for el in self.el.xpath(self.head_xpath): for el in self.el.xpath(self.head_xpath):
title = self.cleaner.clean(el).lower() title = self.cleaner.clean(el).lower()
for name, titles in columns.iteritems(): for name, titles in columns.iteritems():
if title in titles and not name in self._cols: if title in titles and name not in self._cols:
self._cols[name] = colnum self._cols[name] = colnum
try: try:
colnum += int(el.attrib.get('colspan', 1)) colnum += int(el.attrib.get('colspan', 1))