This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new b2db45ff397 tools: escape Python string backslashes
b2db45ff397 is described below

commit b2db45ff397f6e7603aa473bed20ccfc5d8b72fe
Author: Old-Ding <[email protected]>
AuthorDate: Mon Jul 6 01:03:47 2026 +0800

    tools: escape Python string backslashes
    
    Python 3.14 warns about invalid escape sequences in a few tooling strings. 
Escape those backslashes at the Python literal layer; the licensing regex AST 
stays unchanged, and the IDE exporter change only corrects the docstring path 
example.
    
    Run black on tools/licensing/check.py so the licensing helper matches the 
project formatting check.
    
    Signed-off-by: Old-Ding <[email protected]>
---
 tools/ide_exporter.py       | 2 +-
 tools/licensing/apachize.py | 2 +-
 tools/licensing/check.py    | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/ide_exporter.py b/tools/ide_exporter.py
index 155eae8a722..ec398d065f6 100755
--- a/tools/ide_exporter.py
+++ b/tools/ide_exporter.py
@@ -474,7 +474,7 @@ class IARProject(IdeProject):
         IAR sample including nodes
             <option>
               <name>CCIncludePath2</name>
-              <state>$PROJ_DIR$\nuttx\include\</state>
+              <state>$PROJ_DIR$\\nuttx\\include\\</state>
             </option>
         Args:
             sources: list of SourceInfo
diff --git a/tools/licensing/apachize.py b/tools/licensing/apachize.py
index e9c3cf1f527..84c9d19aab1 100755
--- a/tools/licensing/apachize.py
+++ b/tools/licensing/apachize.py
@@ -34,7 +34,7 @@ def apachize(path, header):
 
     with open(path) as f:
         s = f.read()
-        s = re.sub("(?i)/\*\*\*.+?(?:Copyright).+?\*\*\*+/", header, s, 1, 
re.DOTALL)
+        s = re.sub(r"(?i)/\*\*\*.+?(?:Copyright).+?\*\*\*+/", header, s, 1, 
re.DOTALL)
         print(s)
 
 
diff --git a/tools/licensing/check.py b/tools/licensing/check.py
index d52ac3b59d1..2c0b7028319 100755
--- a/tools/licensing/check.py
+++ b/tools/licensing/check.py
@@ -51,7 +51,7 @@ def commit_attributions(c):
 
 
 def get_headers(s):
-    return re.findall("(?i)/\*\*\*.+?(?:Copyright).+?\*\*\*+/", s, re.DOTALL)
+    return re.findall(r"(?i)/\*\*\*.+?(?:Copyright).+?\*\*\*+/", s, re.DOTALL)
 
 
 def get_file(blob):
@@ -131,7 +131,7 @@ def author_has_cla(author):
 
 def header_copyrights(header):
     results = re.findall(
-        " \* *[Cc]opyright:?(?: ?.[Cc].)? *(?:[12][0-9]{3}[,-]? ?)* *(.+)", 
header
+        r" \* *[Cc]opyright:?(?: ?.[Cc].)? *(?:[12][0-9]{3}[,-]? ?)* *(.+)", 
header
     )
     return [re.sub("(. )?[Aa]ll rights reserved.?", "", result) for result in 
results]
 
@@ -139,7 +139,7 @@ def header_copyrights(header):
 def report_cla(author):
     cla = author_has_cla(author)
     if cla:
-        (apacheid, name) = cla
+        apacheid, name = cla
         print(colored("✓", "green"), end=" ")
     else:
         apacheid = None

Reply via email to