summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoyang LIU <tttturtleruss@gmail.com>2026-03-09 15:47:15 +0800
committerJonathan Corbet <corbet@lwn.net>2026-03-22 14:55:21 -0600
commit6108c809f4fd9dbb1a138ba4326d645cc3113a8d (patch)
treeecf8fc2bc8974649936ea11945b075d4f4e91e05
parentcae0e1bbde87750ea6976e4ecbaa424de859d7ba (diff)
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>
-rwxr-xr-xtools/docs/checktransupdate.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/docs/checktransupdate.py b/tools/docs/checktransupdate.py
index f296a969f02c..d7b98753e35f 100755
--- a/tools/docs/checktransupdate.py
+++ b/tools/docs/checktransupdate.py
@@ -78,11 +78,11 @@ def get_origin_from_trans_smartly(origin_path, t_from_head):
(2) Update the translation through commit HASH (TITLE)
"""
# catch flag for 12-bit commit hash
- HASH = r'([0-9a-f]{12})'
+ hash_re = r'([0-9a-f]{12})'
# pattern 1: contains "update to commit HASH"
- pat_update_to = re.compile(rf'update to commit {HASH}')
+ pat_update_to = re.compile(rf'update to commit {hash_re}')
# pattern 2: contains "Update the translation through commit HASH"
- pat_update_translation = re.compile(rf'Update the translation through commit {HASH}')
+ pat_update_translation = re.compile(rf'Update the translation through commit {hash_re}')
origin_commit_hash = None
for line in t_from_head["message"]:
@@ -133,7 +133,7 @@ def check_per_file(file_path):
opath = get_origin_path(file_path)
if not os.path.isfile(opath):
- logging.error("Cannot find the origin path for {file_path}")
+ logging.error("Cannot find the origin path for %s", file_path)
return
o_from_head = get_latest_commit_from(opath, "HEAD")