Skip to content

Commit 07b3b63

Browse files
committed
Fix lint
1 parent 3e0ed9a commit 07b3b63

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

src/clusterfuzz/_internal/cron/grouper.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,9 @@ def group_testcases():
426426
try:
427427
issue_tracker = issue_tracker_utils.get_issue_tracker_for_testcase(
428428
testcase)
429+
logs.info(
430+
f'Running grouping with issue tracker {issue_tracker.project()}, '
431+
f' for testcase {testcase_id}')
429432
except ValueError:
430433
logs.error('Couldn\'t get issue tracker for issue.')
431434
del testcase_map[testcase_id]

src/clusterfuzz/_internal/cron/triage.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -353,19 +353,22 @@ def main():
353353
testcase = data_handler.get_testcase_by_id(testcase_id)
354354
except errors.InvalidTestcaseError:
355355
# Already deleted.
356-
logs.info(f'Skipping testcase {testcase_id}, since it was already deleted.')
356+
logs.info(
357+
f'Skipping testcase {testcase_id}, since it was already deleted.')
357358
continue
358359

359360
critical_tasks_completed = data_handler.critical_tasks_completed(testcase)
360361

361362
# Skip if testcase's job is removed.
362363
if testcase.job_type not in all_jobs:
363-
logs.info(f'Skipping testcase {testcase_id}, since its job was removed ({testcase.job_type})')
364+
logs.info(f'Skipping testcase {testcase_id}, since its job was removed '
365+
f' ({testcase.job_type})')
364366
continue
365367

366368
# Skip if testcase's job is in exclusions list.
367369
if testcase.job_type in excluded_jobs:
368-
logs.info(f'Skipping testcase {testcase_id}, since its job is in the exclusion list ({testcase.job_type})')
370+
logs.info(f'Skipping testcase {testcase_id}, since its job is in the'
371+
f' exclusion list ({testcase.job_type})')
369372
continue
370373

371374
# Emmit the metric for testcases that should be triaged.
@@ -378,19 +381,22 @@ def main():
378381

379382
# If the testcase has a bug filed already, no triage is needed.
380383
if _is_bug_filed(testcase):
381-
logs.info(f'Skipping testcase {testcase_id}, since a bug was already filed.')
384+
logs.info(
385+
f'Skipping testcase {testcase_id}, since a bug was already filed.')
382386
continue
383387

384388
# Check if the crash is important, i.e. it is either a reproducible crash
385389
# or an unreproducible crash happening frequently.
386390
if not _is_crash_important(testcase):
387-
logs.info(f'Skipping testcase {testcase_id}, since the crash is not important.')
391+
logs.info(
392+
f'Skipping testcase {testcase_id}, since the crash is not important.')
388393
continue
389394

390395
# Require that all tasks like minimizaton, regression testing, etc have
391396
# finished.
392397
if not critical_tasks_completed:
393-
logs.info(f'Skipping testcase {testcase_id}, critical tasks still pending.')
398+
logs.info(
399+
f'Skipping testcase {testcase_id}, critical tasks still pending.')
394400
continue
395401

396402
# For testcases that are not part of a group, wait an additional time to
@@ -417,14 +423,16 @@ def main():
417423
# file this crash anywhere.
418424
issue_tracker = issue_tracker_utils.get_issue_tracker_for_testcase(testcase)
419425
if not issue_tracker:
420-
logs.info(f'No issue tracker detected for testcase {testcase_id}, publishing message.')
426+
logs.info(f'No issue tracker detected for testcase {testcase_id}, '
427+
'publishing message.')
421428
issue_filer.notify_issue_update(testcase, 'new')
422429
continue
423430

424431
# If there are similar issues to this test case already filed or recently
425432
# closed, skip filing a duplicate bug.
426433
if _check_and_update_similar_bug(testcase, issue_tracker):
427-
logs.info(f'Skipping testcase {testcase_id}, since a similar bug was already filed.')
434+
logs.info(f'Skipping testcase {testcase_id}, since a similar bug'
435+
' was already filed.')
428436
continue
429437

430438
# Clean up old triage messages that would be not applicable now.

src/clusterfuzz/_internal/issue_management/issue_tracker_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def _get_issue_tracker_project_name(testcase=None):
4545
from clusterfuzz._internal.datastore import data_handler
4646
job_type = testcase.job_type if testcase else None
4747
issue_tracker_name = data_handler.get_issue_tracker_name(job_type)
48-
logs.info(f'For testcase {testcase.key}, using issue tracker {issue_tracker_name}')
48+
logs.info(
49+
f'For testcase {testcase.key}, using issue tracker {issue_tracker_name}')
4950
return issue_tracker_name
5051

5152

@@ -69,7 +70,8 @@ def get_issue_tracker(project_name=None):
6970
issue_project_config = issue_tracker_config.get(project_name)
7071
if not issue_project_config:
7172
raise ValueError('Issue tracker for {} does not exist'.format(project_name))
72-
logs.info(f'Issue tracker = {project_name}, issue tracker config = {issue_project_config}')
73+
logs.info(f'Issue tracker = {project_name}, issue tracker config = '
74+
f'{issue_project_config}')
7375

7476
issue_tracker_type = issue_project_config['type']
7577
constructor = _ISSUE_TRACKER_CONSTRUCTORS.get(issue_tracker_type)

0 commit comments

Comments
 (0)