Index: lnt/server/reporting/report.py =================================================================== --- lnt/server/reporting/report.py +++ lnt/server/reporting/report.py @@ -9,9 +9,9 @@ OrderAndHistory = namedtuple('OrderAndHistory', ['max_order', 'recent_orders']) -def pairs(l): - """Make an iterable of all pairs of consecutive elements in l.""" - return zip(l[:-1], l[1:]) +def pairs(lst): + """Make an iterable of all pairs of consecutive elements in lst.""" + return zip(lst[:-1], lst[1:]) # The hash color palette avoids green and red as these colours are already used Index: lnt/testing/profile/perf.py =================================================================== --- lnt/testing/profile/perf.py +++ lnt/testing/profile/perf.py @@ -34,9 +34,9 @@ # Go through the data and convert counter values to percentages. for f in data['functions'].values(): fc = f['counters'] - for l in f['data']: - for k, v in l[0].items(): - l[0][k] = 100.0 * float(v) / fc[k] + for inst_info in f['data']: + for k, v in inst_info[0].items(): + inst_info[0][k] = 100.0 * float(v) / fc[k] for k, v in fc.items(): fc[k] = 100.0 * v / data['counters'][k] Index: lnt/testing/profile/profilev1impl.py =================================================================== --- lnt/testing/profile/profilev1impl.py +++ lnt/testing/profile/profilev1impl.py @@ -83,5 +83,5 @@ return d def getCodeForFunction(self, fname): - for l in self.data['functions'][fname].get('data', []): - yield (l[0], l[1], l[2]) + for inst_info in self.data['functions'][fname].get('data', []): + yield (inst_info[0], inst_info[1], inst_info[2]) Index: lnt/tests/test_suite.py =================================================================== --- lnt/tests/test_suite.py +++ lnt/tests/test_suite.py @@ -534,8 +534,8 @@ fatal("Could not find CMake cache file: " + cache) cmake_flags += ['-C', cache] - for l in lines: - logger.info(l) + for line in lines: + logger.info(line) # Define compilers before specifying the cache files. early_defs = {} Index: lnt/util/stats.py =================================================================== --- lnt/util/stats.py +++ lnt/util/stats.py @@ -29,9 +29,9 @@ return None -def geometric_mean(l): - iPow = 1. / len(l) - return reduce(lambda a, b: a * b, [v ** iPow for v in l]) +def geometric_mean(values): + iPow = 1. / len(values) + return reduce(lambda a, b: a * b, [v ** iPow for v in values]) def agg_mean(pairs): Index: tests/testing/profilev2impl.py =================================================================== --- tests/testing/profilev2impl.py +++ tests/testing/profilev2impl.py @@ -41,9 +41,9 @@ fobj = io.BytesIO(s) p2 = ProfileV2.deserialize(fobj) - l = list(p2.getCodeForFunction('fn1')) + l1 = list(p2.getCodeForFunction('fn1')) l2 = self.test_data['functions']['fn1']['data'] - self.assertEqual(l, l2) + self.assertEqual(l1, l2) def test_getFunctions(self): p = ProfileV2.upgrade(ProfileV1(copy.deepcopy(self.test_data)))