[PATCH] scripts/checktransupdate.py: fix missing f prefix in f-string

Haoyang LIU posted 1 patch 1 month, 3 weeks ago
scripts/checktransupdate.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] scripts/checktransupdate.py: fix missing f prefix in f-string
Posted by Haoyang LIU 1 month, 3 weeks ago
add a f prefix for f-string

Fixes: 63e96ce050e5 ("scripts: fix all issues reported by pylint")
Signed-off-by: Haoyang LIU <tttturtleruss@gmail.com>
---
 scripts/checktransupdate.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checktransupdate.py b/scripts/checktransupdate.py
index e39529e46c3d..b57fb9139f5f 100755
--- a/scripts/checktransupdate.py
+++ b/scripts/checktransupdate.py
@@ -131,7 +131,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(f"Cannot find the origin path for {file_path}")
         return
 
     o_from_head = get_latest_commit_from(opath, "HEAD")
-- 
2.50.1
Re: [PATCH] scripts/checktransupdate.py: fix missing f prefix in f-string
Posted by Jonathan Corbet 1 month, 3 weeks ago
Haoyang LIU <tttturtleruss@gmail.com> writes:

> add a f prefix for f-string
>
> Fixes: 63e96ce050e5 ("scripts: fix all issues reported by pylint")
> Signed-off-by: Haoyang LIU <tttturtleruss@gmail.com>
> ---
>  scripts/checktransupdate.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checktransupdate.py b/scripts/checktransupdate.py
> index e39529e46c3d..b57fb9139f5f 100755
> --- a/scripts/checktransupdate.py
> +++ b/scripts/checktransupdate.py
> @@ -131,7 +131,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(f"Cannot find the origin path for {file_path}")
>          return

Ouch, good catch; I've applied this.

Thanks,

jon
Re: [PATCH] scripts/checktransupdate.py: fix missing f prefix in f-string
Posted by Dongliang Mu 1 month, 3 weeks ago
On 8/12/25 1:24 AM, Jonathan Corbet wrote:
> Haoyang LIU <tttturtleruss@gmail.com> writes:
>
>> add a f prefix for f-string
>>
>> Fixes: 63e96ce050e5 ("scripts: fix all issues reported by pylint")
>> Signed-off-by: Haoyang LIU <tttturtleruss@gmail.com>
>> ---
>>   scripts/checktransupdate.py | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/checktransupdate.py b/scripts/checktransupdate.py
>> index e39529e46c3d..b57fb9139f5f 100755
>> --- a/scripts/checktransupdate.py
>> +++ b/scripts/checktransupdate.py
>> @@ -131,7 +131,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(f"Cannot find the origin path for {file_path}")
>>           return
> Ouch, good catch; I've applied this.

Wonder why pylint cannot catch this issue.

The Fixes tag is my commit - "fix all issues reported by pylint", :\

Dongliang Mu

>
> Thanks,
>
> jon