Skip to content

Commit

Permalink
Fix invalid escape sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz authored and BenRKarl committed Aug 28, 2023
1 parent 3b7229c commit 146d707
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/authentication/generate_user_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def parse_raw_query_params(data):
# Decode the request into a utf-8 encoded string
decoded = data.decode("utf-8")
# Use a regular expression to extract the URL query parameters string
match = re.search("GET\s\/\?(.*) ", decoded)
match = re.search(r"GET\s\/\?(.*) ", decoded)
params = match.group(1)
# Split the parameters to isolate the key/value pairs
pairs = [pair.split("=") for pair in params.split("&")]
Expand Down
2 changes: 1 addition & 1 deletion google/ads/googleads/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def _validate_customer_id(customer_id, id_type):
"""
if customer_id is not None:
# Checks that the string is comprised only of 10 digits.
pattern = re.compile("^\d{10}", re.ASCII)
pattern = re.compile(r"^\d{10}", re.ASCII)
if not pattern.fullmatch(customer_id):
raise ValueError(
f"The specified {id_type} customer ID is invalid. It must be a "
Expand Down

0 comments on commit 146d707

Please sign in to comment.