Skip to content

Commit b95a827

Browse files
committed
Don't use l as variable names
1 parent ebf04be commit b95a827

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

easybuild/tools/configobj.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2025,7 +2025,7 @@ def write(self, outfile=None, section=None):
20252025
# might need to encode
20262026
# NOTE: This will *screw* UTF16, each line will start with the BOM
20272027
if self.encoding:
2028-
out = [l.encode(self.encoding) for l in out]
2028+
out = [line.encode(self.encoding) for line in out]
20292029
if (self.BOM and ((self.encoding is None) or
20302030
(BOM_LIST.get(self.encoding.lower()) == 'utf_8'))):
20312031
# Add the UTF8 BOM

easybuild/tools/docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ def list_software_rst(software, detailed=False):
602602

603603
def key_to_ref(name):
604604
"""Create a reference label for the specified software name."""
605-
return 'list_software_%s_%d' % (name, sum(ord(l) for l in name))
605+
return 'list_software_%s_%d' % (name, sum(ord(letter) for letter in name))
606606

607607
letter = None
608608
sorted_keys = sorted(software.keys(), key=lambda x: x.lower())

easybuild/tools/filetools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2228,8 +2228,8 @@ def diff_files(path1, path2):
22282228
"""
22292229
Return unified diff between two files
22302230
"""
2231-
file1_lines = ['%s\n' % l for l in read_file(path1).split('\n')]
2232-
file2_lines = ['%s\n' % l for l in read_file(path2).split('\n')]
2231+
file1_lines = ['%s\n' % line for line in read_file(path1).split('\n')]
2232+
file2_lines = ['%s\n' % line for line in read_file(path2).split('\n')]
22332233
return ''.join(difflib.unified_diff(file1_lines, file2_lines, fromfile=path1, tofile=path2))
22342234

22352235

easybuild/tools/include.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
import pkgutil
6969
7070
# extend path so Python finds our easyblocks in the subdirectories where they are located
71-
subdirs = [chr(l) for l in range(ord('a'), ord('z') + 1)] + ['0']
71+
subdirs = [chr(char) for char in range(ord('a'), ord('z') + 1)] + ['0']
7272
for subdir in subdirs:
7373
__path__ = pkgutil.extend_path(__path__, '%s.%s' % (__name__, subdir))
7474

easybuild/tools/module_generator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,10 @@ def get_description(self, conflict=True):
763763
# - 'conflict Compiler/GCC/4.8.2/OpenMPI' for 'Compiler/GCC/4.8.2/OpenMPI/1.6.4'
764764
lines.extend(['', "conflict %s" % os.path.dirname(self.app.short_mod_name)])
765765

766-
whatis_lines = ["module-whatis {%s}" % re.sub(r'([{}\[\]])', r'\\\1', l) for l in self._generate_whatis_lines()]
766+
whatis_lines = [
767+
"module-whatis {%s}" % re.sub(r'([{}\[\]])', r'\\\1', line)
768+
for line in self._generate_whatis_lines()
769+
]
767770
txt += '\n'.join([''] + lines + ['']) % {
768771
'name': self.app.name,
769772
'version': self.app.version,

easybuild/tools/run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,10 +580,10 @@ def parse_log_for_error(txt, regExp=None, stdout=True, msg=None):
580580
reg = re.compile(regExp, re.I)
581581

582582
res = []
583-
for l in txt.split('\n'):
584-
r = reg.search(l)
583+
for line in txt.split('\n'):
584+
r = reg.search(line)
585585
if r:
586-
res.append([l, r.groups()])
586+
res.append([line, r.groups()])
587587
errors_found_in_log += 1
588588

589589
if stdout and res:

0 commit comments

Comments
 (0)