util/lint: Clear syntax warnings in Python 3.12
Since Python 3.12, invalid escape sequences produce a SyntaxWarning; in the future, they will produce SyntaxError. Using raw strings clear out the warning. Below the command used for checking the fix worked. ``` $ python3 util/lint/checkpatch_json.py ``` Link: https://docs.python.org/3.12/whatsnew/3.12.html#other-language-changes Change-Id: I0177dc7f0d3013759879320afdb6ab548d356bc7 Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/85771 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
This commit is contained in:
parent
2c65add5ad
commit
845bdef386
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ def parse_file(input_file):
|
|||
file_path = temp[1].split(":")[0]
|
||||
line_number = temp[1].split(":")[1]
|
||||
update_struct( file_path.strip(), msg_output, str(line_number) )
|
||||
elif re.search("^\d+:\Z",line) != "None" and line.startswith("#"):
|
||||
elif re.search(r"^\d+:\Z",line) != "None" and line.startswith("#"):
|
||||
file_path="/COMMIT_MSG"
|
||||
line = line.replace('#', '')
|
||||
line_number = int(line.split(":")[0]) + 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue