Skip to content

Commit

Permalink
Merge pull request #459 from ehossack/fix/invalid-escape-sequence-3.12
Browse files Browse the repository at this point in the history
fix invalid escape sequences (python 3.12 SyntaxWarning)
  • Loading branch information
mjurbanski-reef committed Feb 2, 2024
2 parents c319ed4 + ced69f3 commit fc23486
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion b2sdk/file_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class FileVersion(BaseFileVersion):
"""
A structure which represents a version of a file (in B2 cloud).
:ivar str ~.id\_: ``fileId``
:ivar str ~.id_: ``fileId``
:ivar str ~.file_name: full file name (with path)
:ivar ~.size: size in bytes, can be ``None`` (unknown)
:ivar str ~.content_type: RFC 822 content type, for example ``"application/octet-stream"``
Expand Down
2 changes: 1 addition & 1 deletion b2sdk/raw_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ class RawSimulator(AbstractRawApi):
DOWNLOAD_URL_MATCHER = re.compile(
DOWNLOAD_URL + '(?:' + '|'.join(
(
'/b2api/v[0-9]+/b2_download_file_by_id\?fileId=(?P<file_id>[^/]+)',
r'/b2api/v[0-9]+/b2_download_file_by_id\?fileId=(?P<file_id>[^/]+)',
'/file/(?P<bucket_name>[^/]+)/(?P<file_name>.+)',
)
) + ')$'
Expand Down
2 changes: 1 addition & 1 deletion b2sdk/v2/file_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class FileVersion(v3.FileVersion):
"""
A structure which represents a version of a file (in B2 cloud).
:ivar str ~.id\_: ``fileId``
:ivar str ~.id_: ``fileId``
:ivar str ~.file_name: full file name (with path)
:ivar ~.size: size in bytes, can be ``None`` (unknown)
:ivar str ~.content_type: RFC 822 content type, for example ``"application/octet-stream"``
Expand Down
1 change: 1 addition & 0 deletions changelog.d/458.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix escape sequence warnings present in python 3.12.

0 comments on commit fc23486

Please sign in to comment.