Skip to content

Commit 2d36111

Browse files
committed
Add type hints to altered code
1 parent 1cc9d77 commit 2d36111

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

b2sdk/transfer/inbound/downloader/abstract.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ class AbstractDownloader(metaclass=B2TraceMetaAbstract):
5050
def __init__(
5151
self,
5252
thread_pool: Optional[ThreadPoolExecutor] = None,
53-
force_chunk_size=None,
54-
min_chunk_size=None,
55-
max_chunk_size=None,
56-
align_factor=None,
57-
check_hash=True,
53+
force_chunk_size: Optional[int] = None,
54+
min_chunk_size: Optional[int] = None,
55+
max_chunk_size: Optional[int] = None,
56+
align_factor: Optional[int] = None,
57+
check_hash: bool = True,
5858
**kwargs
5959
):
6060
align_factor = align_factor or self.DEFAULT_ALIGN_FACTOR
@@ -76,7 +76,7 @@ def _get_hasher(self):
7676
return hashlib.sha1()
7777
return EmptyHasher()
7878

79-
def _get_chunk_size(self, content_length):
79+
def _get_chunk_size(self, content_length: Optional[int]):
8080
if self._forced_chunk_size is not None:
8181
return self._forced_chunk_size
8282
ideal = max(content_length // 1000, self._align_factor)

0 commit comments

Comments
 (0)