Skip to content

Commit a87b5a4

Browse files
committed
Add some more types
1 parent 8780d7e commit a87b5a4

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

frameioclient/lib/transfer.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,20 @@
44
import time
55
from pprint import pprint
66
from random import randint
7-
from typing import Dict, List
7+
from typing import Dict, List, Optional
88

99
import requests
1010

11-
from .exceptions import (
12-
AssetChecksumMismatch,
13-
AssetChecksumNotPresent,
14-
DownloadException,
15-
)
11+
from .exceptions import (AssetChecksumMismatch, AssetChecksumNotPresent,
12+
DownloadException)
1613
from .logger import SDKLogger
1714
from .utils import FormatTypes, Utils
1815

1916
logger = SDKLogger("downloads")
2017

2118
from .bandwidth import DiskBandwidth, NetworkBandwidth
22-
from .exceptions import (
23-
AssetNotFullyUploaded,
24-
DownloadException,
25-
WatermarkIDDownloadException,
26-
)
19+
from .exceptions import (AssetNotFullyUploaded, DownloadException,
20+
WatermarkIDDownloadException)
2721
from .transport import HTTPClient
2822

2923

@@ -256,7 +250,7 @@ def _optimize_concurrency(self):
256250

257251
return 5
258252

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):
260254
"""
261255
Get a specific byte range from a given URL. This is **not** optimized \
262256
for heavily-threaded operations currently.

0 commit comments

Comments
 (0)