From 18c3d2a89f32b549cf15f881ca4d684fbbc17e8c Mon Sep 17 00:00:00 2001 From: nodiscc Date: Wed, 20 Dec 2023 16:22:12 +0100 Subject: [PATCH] fix pylint warning W1202: Use lazy % formatting in logging functions --- hecat/processors/awesome_lint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hecat/processors/awesome_lint.py b/hecat/processors/awesome_lint.py index 7a42357..4773216 100644 --- a/hecat/processors/awesome_lint.py +++ b/hecat/processors/awesome_lint.py @@ -127,10 +127,10 @@ def check_tag_has_at_least_items(tag, software_list, tags_with_redirect, errors, tag_items_count += 1 try: assert tag_items_count >= min_items - logging.debug('{} items tagged {}'.format(tag_items_count, tag['name'])) + logging.debug('%s items tagged %s', tag_items_count, tag['name']) except AssertionError: if tag['name'] in tags_with_redirect and tag_items_count == 0: - logging.debug('0 items tagged {}, but this tag has the redirect attribute set'.format(tag['name'])) + logging.debug('0 items tagged %s, but this tag has the redirect attribute set', tag['name']) else: message = "{} items tagged {}, each tag must have at least {} items attached".format(tag_items_count, tag['name'], min_items) log_exception(message, errors)