Skip to content

Commit

Permalink
Fix regex to use raw string.
Browse files Browse the repository at this point in the history
Fixes #193
  • Loading branch information
coleifer committed Mar 7, 2024
1 parent b0505a6 commit f4260d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion walrus/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def decode_dict_keys(d):
def make_python_attr(s):
if isinstance(s, bytes):
s = decode(s)
s = re.sub('[^\w]+', '_', s)
s = re.sub(r'[^\w]+', '_', s)
if not s:
raise ValueError('cannot construct python identifer from "%s"' % s)
if s[0].isdigit():
Expand Down

0 comments on commit f4260d4

Please sign in to comment.