Skip to content

Commit

Permalink
Use raw-string notation for regex to avoid invalid escape sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Oct 30, 2018
1 parent f04267b commit 28b7402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sendgrid/helpers/mail/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, regex_strings=None, use_default=True):
self.regexes.add(re.compile(regex_string))

if use_default:
default_regex_string = 'SG\.[0-9a-zA-Z]+\.[0-9a-zA-Z]+'
default_regex_string = r'SG\.[0-9a-zA-Z]+\.[0-9a-zA-Z]+'
self.regexes.add(re.compile(default_regex_string))

def validate_message_dict(self, request_body):
Expand Down

0 comments on commit 28b7402

Please sign in to comment.