|
4 | 4 | import time |
5 | 5 | from pprint import pprint |
6 | 6 | from random import randint |
7 | | -from typing import Dict, List |
| 7 | +from typing import Dict, List, Optional |
8 | 8 |
|
9 | 9 | import requests |
10 | 10 |
|
11 | | -from .exceptions import ( |
12 | | - AssetChecksumMismatch, |
13 | | - AssetChecksumNotPresent, |
14 | | - DownloadException, |
15 | | -) |
| 11 | +from .exceptions import (AssetChecksumMismatch, AssetChecksumNotPresent, |
| 12 | + DownloadException) |
16 | 13 | from .logger import SDKLogger |
17 | 14 | from .utils import FormatTypes, Utils |
18 | 15 |
|
19 | 16 | logger = SDKLogger("downloads") |
20 | 17 |
|
21 | 18 | from .bandwidth import DiskBandwidth, NetworkBandwidth |
22 | | -from .exceptions import ( |
23 | | - AssetNotFullyUploaded, |
24 | | - DownloadException, |
25 | | - WatermarkIDDownloadException, |
26 | | -) |
| 19 | +from .exceptions import (AssetNotFullyUploaded, DownloadException, |
| 20 | + WatermarkIDDownloadException) |
27 | 21 | from .transport import HTTPClient |
28 | 22 |
|
29 | 23 |
|
@@ -256,7 +250,7 @@ def _optimize_concurrency(self): |
256 | 250 |
|
257 | 251 | return 5 |
258 | 252 |
|
259 | | - def _get_byte_range(self, url, start_byte=0, end_byte=2048): |
| 253 | + def _get_byte_range(self, url: str, start_byte: Optional[int] = 0, end_byte: Optional[int] = 2048): |
260 | 254 | """ |
261 | 255 | Get a specific byte range from a given URL. This is **not** optimized \ |
262 | 256 | for heavily-threaded operations currently. |
|
0 commit comments