Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SyntaxWarning: invalid escape sequence errors on Python 3.12 #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sonic/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _parse_protocol_version(text):
Returns:
str -- protocol version.
"""
matches = re.findall("protocol\((\w+)\)", text)
matches = re.findall(r"protocol\((\w+)\)", text)
if not matches:
raise ValueError("{} doesn't contain protocol(NUMBER)".format(text))
return matches[0]
Expand All @@ -131,7 +131,7 @@ def _parse_buffer_size(text):
str -- buffering.
"""

matches = re.findall("buffer\((\w+)\)", text)
matches = re.findall(r"buffer\((\w+)\)", text)
if not matches:
raise ValueError("{} doesn't contain buffer(NUMBER)".format(text))
return matches[0]
Expand All @@ -150,7 +150,7 @@ def _get_async_response_id(text):
str -- async response id
"""
text = text.strip()
matches = re.findall("PENDING (\w+)", text)
matches = re.findall(r"PENDING (\w+)", text)
if not matches:
raise ValueError("{} doesn't contain async response id".format(text))
return matches[0]
Expand Down