On 2025-05-09 09:30, Andreas Schwab wrote:
On Mai 09 2025, Torbjörn SVENSSON wrote:
diff --git a/contrib/check_GNU_style_lib.py b/contrib/check_GNU_style_lib.py
index f680983d2f3..8b930ef6bdb 100755
--- a/contrib/check_GNU_style_lib.py
+++ b/contrib/check_GNU_style_lib.py
@@ -279,7 +279,9 @@ def check_GNU_style_file(file, format):
patch = PatchSet(file)
for pfile in patch.added_files + patch.modified_files:
- t = pfile.target_file.lstrip('b/')
+ t = pfile.target_file
+ if t.startswith('b/'):
+ t = t[2:]
a.k.a. t = pfile.target_file.removeprefix('b/')
Yes, but that would limit to python 3.9 or higher.
Kind regards,
Torbjörn