TechDebt: Fix invalid escape sequence, enable pylint check (#5532)

This commit is contained in:
Bobby Impollonia 2022-10-04 15:12:09 -04:00 committed by GitHub
parent ba517c156d
commit 82ee649242
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1394,7 +1394,7 @@ class S3Response(BaseResponse):
checksum_value = request.headers.get(checksum_header)
if not checksum_value and checksum_algorithm:
# Extract the checksum-value from the body first
search = re.search(b"x-amz-checksum-\w+:(\w+={1,2})", body)
search = re.search(rb"x-amz-checksum-\w+:(\w+={1,2})", body)
checksum_value = search.group(1) if search else None
if checksum_value:

View File

@ -15,4 +15,4 @@ ignore-paths=moto/packages
[pylint.'MESSAGES CONTROL']
disable = W,C,R,E
# future sensible checks = super-init-not-called, unspecified-encoding, undefined-loop-variable
enable = arguments-renamed, dangerous-default-value, deprecated-module, function-redefined, import-self, redefined-builtin, redefined-outer-name, reimported, pointless-statement, super-with-arguments, unused-argument, unused-import, unused-variable, useless-else-on-loop, wildcard-import
enable = anomalous-backslash-in-string, arguments-renamed, dangerous-default-value, deprecated-module, function-redefined, import-self, redefined-builtin, redefined-outer-name, reimported, pointless-statement, super-with-arguments, unused-argument, unused-import, unused-variable, useless-else-on-loop, wildcard-import