summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2018-08-28 20:46:59 +0100
committerJavier Jardón <jjardon@gnome.org>2018-08-28 23:22:00 +0100
commitc6fb5ba71e2be3579ce5d4a512139ee811a04759 (patch)
treeeec9027f93223ca7ecceb3005f00b8b2a099f94e
parent3ae5fd05d0b9b97448d40ba64c528f31f83c2915 (diff)
downloadbuildstream-jjardon/pycodestyle_fixes.tar.gz
Fix E741 warningsjjardon/pycodestyle_fixes
-rw-r--r--buildstream/plugins/sources/tar.py6
-rw-r--r--buildstream/plugins/sources/zip.py4
-rwxr-xr-xdoc/bst2html.py4
3 files changed, 7 insertions, 7 deletions
diff --git a/buildstream/plugins/sources/tar.py b/buildstream/plugins/sources/tar.py
index e32cc3dc8..7814679c7 100644
--- a/buildstream/plugins/sources/tar.py
+++ b/buildstream/plugins/sources/tar.py
@@ -127,7 +127,7 @@ class TarSource(DownloadableFileSource):
if not base_dir.endswith(os.sep):
base_dir = base_dir + os.sep
- l = len(base_dir)
+ L = len(base_dir)
for member in tar.getmembers():
# First, ensure that a member never starts with `./`
@@ -145,9 +145,9 @@ class TarSource(DownloadableFileSource):
# base directory.
#
if member.type == tarfile.LNKTYPE:
- member.linkname = member.linkname[l:]
+ member.linkname = member.linkname[L:]
- member.path = member.path[l:]
+ member.path = member.path[L:]
yield member
# We want to iterate over all paths of a tarball, but getmembers()
diff --git a/buildstream/plugins/sources/zip.py b/buildstream/plugins/sources/zip.py
index d3ce0f16d..0bbb2cd27 100644
--- a/buildstream/plugins/sources/zip.py
+++ b/buildstream/plugins/sources/zip.py
@@ -121,13 +121,13 @@ class ZipSource(DownloadableFileSource):
if not base_dir.endswith(os.sep):
base_dir = base_dir + os.sep
- l = len(base_dir)
+ L = len(base_dir)
for member in archive.infolist():
if member.filename == base_dir:
continue
if member.filename.startswith(base_dir):
- member.filename = member.filename[l:]
+ member.filename = member.filename[L:]
yield member
# We want to iterate over all paths of an archive, but namelist()
diff --git a/doc/bst2html.py b/doc/bst2html.py
index 0cfb43b5c..eaf25eae8 100755
--- a/doc/bst2html.py
+++ b/doc/bst2html.py
@@ -96,8 +96,8 @@ def _ansi2html_get_styles(palette):
for g in range(24):
i = g + 232
- l = g * 10 + 8
- indexed_style['%s' % i] = ''.join('%02X' % c if 0 <= c <= 255 else None for c in (l, l, l))
+ L = g * 10 + 8
+ indexed_style['%s' % i] = ''.join('%02X' % c if 0 <= c <= 255 else None for c in (L, L, L))
_ANSI2HTML_STYLES[palette] = (regular_style, bold_style, indexed_style)
return _ANSI2HTML_STYLES[palette]