From 8d5d0c1b5986e7416b085ba149d98dd31295670f Mon Sep 17 00:00:00 2001 From: Vincent A Date: Tue, 14 Jul 2020 16:52:45 +0200 Subject: [PATCH] modules: fix some "ambiguous variable name 'l'" flakes E741 --- modules/bnporc/company/pages.py | 2 +- modules/bnporc/pp/pages.py | 2 +- modules/caissedepargne/pages.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/bnporc/company/pages.py b/modules/bnporc/company/pages.py index 80871622a0..8f9869d900 100644 --- a/modules/bnporc/company/pages.py +++ b/modules/bnporc/company/pages.py @@ -78,7 +78,7 @@ def checksum(self, coords): else: s += "O" s += "\n" - s = '\n'.join([l for l in s.splitlines() if l.strip()]) + s = '\n'.join(line for line in s.splitlines() if line.strip()) return hashlib.md5(s).hexdigest() diff --git a/modules/bnporc/pp/pages.py b/modules/bnporc/pp/pages.py index 2a53d9aeee..11997a52a6 100644 --- a/modules/bnporc/pp/pages.py +++ b/modules/bnporc/pp/pages.py @@ -137,7 +137,7 @@ def on_load(self): new_passwords = [] for i in range(self.NOT_REUSABLE_PASSWORDS_COUNT): - new_pass = ''.join([str((int(l) + i + 1) % 10) for l in self.browser.password]) + new_pass = ''.join(str((int(char) + i + 1) % 10) for char in self.browser.password) if not self.looks_legit(new_pass): self.logger.warning('One of rotating password is not legit') raise BrowserPasswordExpired(msg) diff --git a/modules/caissedepargne/pages.py b/modules/caissedepargne/pages.py index 16e5dc1cc7..5e77d36902 100644 --- a/modules/caissedepargne/pages.py +++ b/modules/caissedepargne/pages.py @@ -1130,7 +1130,7 @@ def get_history(self): t.date = Date(dayfirst=True).filter(m.group(1)) if t.date is NotAvailable: continue - if any(l in t.raw.lower() for l in ('tot dif', 'fac cb')): + if any(pattern in t.raw.lower() for pattern in ('tot dif', 'fac cb')): t._link = Link(tr.xpath('./td/a'))(self.doc) # "Cb" for new site, "CB" for old one -- GitLab