This commit is contained in:
Old-Ding 2026-07-31 09:01:38 +08:00 committed by GitHub
commit 6a793eacdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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)

View file

@ -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