cleanup: fixes regex escape warnings in S3Uri.py, FileLists.py #1370
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Similar to the regex escaping issues reported in #1351, it looks like there are still a few invalid escape sequences in
S3Uri.py
andFileLists.py
ins3cmd
version 2.4.0.I saw these warnings while uploading a file:
The first is from this line:
s3cmd/S3/S3Uri.py
Lines 122 to 123 in dbdee8f
The
\
characters are interpreted as escaping characters in the Python string itself.The second warning is about the same issue for a different line, where only one
\
needs to be escaped or at least interpreted differently, the one in\w
:s3cmd/S3/S3Uri.py
Line 170 in dbdee8f
And the third one from here:
s3cmd/S3/FileLists.py
Line 525 in dbdee8f
There are many different ways to fix this problem, but I saw that commit 7ebafbe was linked from #1351 so I used the same technique here, I hope this works for you.