Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools/docs/checktransupdate.py: fix all issues reported by pylint

This patch fixes all issues reported by pylint, including:
1. Format issue in logging.
2. Variable name style issue.

Fixes: 63e96ce050e5 ("scripts: fix all issues reported by pylint")
Signed-off-by: Haoyang LIU <tttturtleruss@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260309074716.10739-1-tttturtleruss@gmail.com>

authored by

Haoyang LIU and committed by
Jonathan Corbet
6108c809 cae0e1bb

+4 -4
+4 -4
tools/docs/checktransupdate.py
··· 78 78 (2) Update the translation through commit HASH (TITLE) 79 79 """ 80 80 # catch flag for 12-bit commit hash 81 - HASH = r'([0-9a-f]{12})' 81 + hash_re = r'([0-9a-f]{12})' 82 82 # pattern 1: contains "update to commit HASH" 83 - pat_update_to = re.compile(rf'update to commit {HASH}') 83 + pat_update_to = re.compile(rf'update to commit {hash_re}') 84 84 # pattern 2: contains "Update the translation through commit HASH" 85 - pat_update_translation = re.compile(rf'Update the translation through commit {HASH}') 85 + pat_update_translation = re.compile(rf'Update the translation through commit {hash_re}') 86 86 87 87 origin_commit_hash = None 88 88 for line in t_from_head["message"]: ··· 133 133 opath = get_origin_path(file_path) 134 134 135 135 if not os.path.isfile(opath): 136 - logging.error("Cannot find the origin path for {file_path}") 136 + logging.error("Cannot find the origin path for %s", file_path) 137 137 return 138 138 139 139 o_from_head = get_latest_commit_from(opath, "HEAD")