Skip to content

Commit

Permalink
Refactor code for readable
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua committed Oct 9, 2024
1 parent e9c49b3 commit e95f65c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tosfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
MANAGED_COPY_MAX_THRESHOLD,
MANAGED_COPY_MIN_THRESHOLD,
MPU_PART_SIZE_THRESHOLD,
PART_MAX_SIZE,
PUT_OBJECT_OPERATION_SMALL_FILE_THRESHOLD,
TOS_SERVER_STATUS_CODE_NOT_FOUND,
TOSFS_LOG_FORMAT,
Expand Down Expand Up @@ -1430,7 +1431,7 @@ def _copy_basic(self, path1: str, path2: str, **kwargs: Any) -> None:
)

def _copy_etag_preserved(
self, path1: str, path2: str, size: int, total_parts: int, **kwargs: Any
self, path1: str, path2: str, size: int, total_parts: int, **kwargs: Any
) -> None:
"""Copy file as multiple-part while preserving the etag."""
bucket1, key1, version1 = self._split_path(path1)
Expand All @@ -1455,9 +1456,9 @@ def _copy_etag_preserved(
brange_last = size - 1

def _call_upload_part_copy(
i: int = i,
brange_first: int = brange_first,
brange_last: int = brange_last,
i: int = i,
brange_first: int = brange_first,
brange_last: int = brange_last,
) -> UploadPartCopyOutput:
return self.tos_client.upload_part_copy(
bucket=bucket2,
Expand Down

0 comments on commit e95f65c

Please sign in to comment.