Skip to content

Commit 4e21895

Browse files
author
Thomas Preud'homme
committed
Fix flake8 failures
A number of flake8 failures have cropped up in testsuitedb which this commits fixes. Reviewed By: cmatthews Differential Revision: https://reviews.llvm.org/D121679
1 parent 0e3a5f7 commit 4e21895

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

lnt/server/db/testsuitedb.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,10 @@ def _importSampleValues(self, session, tests_data, run, config):
10391039

10401040
field_dict = dict([(f.name, f) for f in self.sample_fields])
10411041
all_samples_to_add = []
1042-
is_profile_only = lambda td : len(td) == 2 and 'profile' in td
1042+
1043+
def is_profile_only(td):
1044+
return len(td) == 2 and 'profile' in td
1045+
10431046
for test_data in tests_data:
10441047
if is_profile_only(test_data):
10451048
# Ignore for now profile data without other metrics
@@ -1078,8 +1081,11 @@ def _importSampleValues(self, session, tests_data, run, config):
10781081
continue
10791082
name = test_data['name']
10801083
test = test_cache.get(name)
1081-
tests = [test_cache[test_name] for test_name in test_cache \
1082-
if test_name.startswith(name + '.test:')]
1084+
tests = [
1085+
test_cache[test_name]
1086+
for test_name in test_cache
1087+
if test_name.startswith(name + '.test:')
1088+
]
10831089
if test is not None:
10841090
tests.append(test)
10851091

@@ -1095,10 +1101,10 @@ def _importSampleValues(self, session, tests_data, run, config):
10951101
count += 1
10961102
sample_exist = True
10971103
else:
1098-
logger.warning('Test %s already contains the profile data. ' \
1099-
'Profile %s was ignored.', test.name, name)
1104+
logger.warning('Test %s already contains the profile data. '
1105+
'Profile %s was ignored.', test.name, name)
11001106
if not sample_exist:
1101-
logger.warning('The test %s is invalid. It contains the profile, ' \
1107+
logger.warning('The test %s is invalid. It contains the profile, '
11021108
'but no any samples. Consider removing it.', test.name)
11031109
if count == 0:
11041110
logger.warning('Cannot find test(s) for the profile %s', name)

0 commit comments

Comments
 (0)