diff --git a/tools/ide_exporter.py b/tools/ide_exporter.py index 155eae8a72263..ec398d065f65a 100755 --- a/tools/ide_exporter.py +++ b/tools/ide_exporter.py @@ -474,7 +474,7 @@ def make_include(self, sources, parent_node=None): IAR sample including nodes Args: sources: list of SourceInfo diff --git a/tools/licensing/apachize.py b/tools/licensing/apachize.py index e9c3cf1f527da..84c9d19aab10c 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 d52ac3b59d187..2c0b702831992 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