Skip to content

Commit

Permalink
Use Raw Python Strings for Regex in Python
Browse files Browse the repository at this point in the history
Was seeing a lot of SyntaxWarnings when building as some regex
strings were not raw strings and thus were showing invalid escape
sequences due to (python/cpython#98401).
These are just warnings now on Python 3.12, but will become errors
in the future. Fixing now to prevent builds breaking. It seems the
files are mostly following this convention now, so this makes the
non raw strings consistent.

Change-Id: Ia8eacfd353c41a6c1d8e0482f3b7fbd4dc7a93e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5832811
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1352933}


CrOS-Libchrome-Original-Commit: 31f4229550ffa8f15f7a5da9b67a84cc4f4eb757
  • Loading branch information
geoadaMeta authored and chromeos-ci-prod committed Sep 10, 2024
1 parent ef037e5 commit 25e05fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/android/gyp/util/resources_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


def _ResourceNameToJavaSymbol(resource_name):
return re.sub('[\.:]', '_', resource_name)
return re.sub(r'[\.:]', '_', resource_name)


class RTxtGenerator:
Expand Down

0 comments on commit 25e05fc

Please sign in to comment.