Resolve invalid escape sequence

When run not as a decorator dynamodb2 displays an invalid escape sequence error
/moto/dynamodb2/responses.py:603: DeprecationWarning: invalid escape sequence \s
  '\s*([=\+-])\s*', '\\1', update_expression)
This commit is contained in:
aksagrimada 2019-08-06 07:16:00 +01:00 committed by GitHub
parent 40271d2c4e
commit a3794f2701
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -600,7 +600,7 @@ class DynamoHandler(BaseResponse):
# E.g. `a = b + c` -> `a=b+c`
if update_expression:
update_expression = re.sub(
'\s*([=\+-])\s*', '\\1', update_expression)
r'\s*([=\+-])\s*', '\\1', update_expression)
try:
item = self.dynamodb_backend.update_item(