Skip to content

Commit

Permalink
fix min_part_size param docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
mjurbanski-reef committed Feb 19, 2024
1 parent 550b320 commit fe200fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions b2sdk/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def upload_local_file(
:param content_type: the MIME type, or ``None`` to accept the default based on file extension of the B2 file name
:param file_info: a file info to store with the file or ``None`` to not store anything
:param sha1_sum: file SHA1 hash or ``None`` to compute it automatically
a minimum size of a part
:param min_part_size: lower limit of part size for the transfer planner, in bytes
:param b2sdk.v2.AbstractProgressListener,None progress_listener: a progress listener object to use, or ``None`` to not report progress
:param b2sdk.v2.EncryptionSetting encryption: encryption settings (``None`` if unknown)
:param b2sdk.v2.FileRetentionSetting file_retention: file retention setting
Expand Down Expand Up @@ -770,10 +770,10 @@ def upload_unbound_stream(
:param encryption: encryption settings (``None`` if unknown)
:param file_retention: file retention setting
:param legal_hold: legal hold setting
a minimum size of a part
:param recommended_upload_part_size: the recommended part size to use for uploading local sources
or ``None`` to determine automatically
:param max_part_size: a maximum size of a part
:param min_part_size: lower limit of part size for the transfer planner, in bytes
:param max_part_size: upper limit of part size for the transfer planner, in bytes
:param large_file_sha1: SHA-1 hash of the result file or ``None`` if unknown
:param buffers_count: desired number of buffers allocated, cannot be smaller than 2
:param buffer_size: size of a single buffer that we pull data to or upload data to B2. If ``None``,
Expand Down Expand Up @@ -880,7 +880,7 @@ def upload(
:param str file_name: the file name of the new B2 file
:param str,None content_type: the MIME type, or ``None`` to accept the default based on file extension of the B2 file name
:param dict,None file_info: a file info to store with the file or ``None`` to not store anything
:param int,None min_part_size: the smallest part size to use or ``None`` to determine automatically
:param min_part_size: lower limit of part size for the transfer planner, in bytes
:param b2sdk.v2.AbstractProgressListener,None progress_listener: a progress listener object to use, or ``None`` to not report progress
:param b2sdk.v2.EncryptionSetting encryption: encryption settings (``None`` if unknown)
:param b2sdk.v2.FileRetentionSetting file_retention: file retention setting
Expand Down Expand Up @@ -969,7 +969,7 @@ def create_file(
:param b2sdk.v2.EncryptionSetting encryption: encryption settings (``None`` if unknown)
:param b2sdk.v2.FileRetentionSetting file_retention: file retention setting
:param bool legal_hold: legal hold setting
lower limit of part size for the transfer planner, in bytes
:param min_part_size: lower limit of part size for the transfer planner, in bytes
:param max_part_size: upper limit of part size for the transfer planner, in bytes
:param Sha1HexDigest,None large_file_sha1: SHA-1 hash of the result file or ``None`` if unknown
:param int,None custom_upload_timestamp: override object creation date, expressed as a number of milliseconds since epoch
Expand Down Expand Up @@ -1383,6 +1383,8 @@ def copy(
:param bool legal_hold: legal hold setting for the new file.
:param str,None cache_control: an optional cache control setting. Syntax based on the section 14.9 of RFC 2616.
Example string value: 'public, max-age=86400, s-maxage=3600, no-transform'.
:param min_part_size: lower limit of part size for the transfer planner, in bytes
:param max_part_size: upper limit of part size for the transfer planner, in bytes
:param str,datetime.datetime,None expires: an optional cache expiration setting.
If this argument is a string, its syntax must be based on the section 14.21 of RFC 2616.
Example string value: 'Thu, 01 Dec 2050 16:00:00 GMT'. If this argument is a datetime,
Expand Down
2 changes: 1 addition & 1 deletion b2sdk/transfer/emerge/planner/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __init__(
recommended_upload_part_size: int | None = None,
max_part_size: int | None = None,
):
# ensure default values are do not break min<=recommended<=max condition,
# ensure default values do not break min<=recommended<=max condition,
# while respecting user input and not auto fixing if something was provided explicitly
self.min_part_size = min(
DEFAULT_MIN_PART_SIZE, *_filter_out_none(recommended_upload_part_size, max_part_size)
Expand Down

0 comments on commit fe200fe

Please sign in to comment.