Skip to content

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
sharevb committed Nov 29, 2023
1 parent d650a22 commit f7878c0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions transferwee.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,10 @@ def _storm_prepare(authorization: str, filenames: List[str]) -> Dict[Any, Any]:
files_bids = [_storm_prepare_item(f) for f in filenames]

blocks = [i for sublist in files_bids for i in sublist]
response = {"ok": True, "data": {"blocks": []}}
response: Dict[str, Union[bool, Dict[str, List[Any]]]] = {
"ok": True,
"data": {"blocks": []},
}
chunk_size = 100
for i in range(0, len(blocks), chunk_size):
j = {
Expand Down Expand Up @@ -406,7 +409,9 @@ def _storm_prepare(authorization: str, filenames: List[str]) -> Dict[Any, Any]:
if not r_json["ok"]:
logger.error(r_json)
response["ok"] = response["ok"] and r_json["ok"]
response["data"]["blocks"] += r_json["data"]["blocks"]
typing.cast(typing.Dict[str, List], response["data"])[
"blocks"
] += typing.cast(typing.Dict[str, List], r_json["data"])["blocks"]

return {"files_bids": files_bids, "blocks": response}

Expand Down

0 comments on commit f7878c0

Please sign in to comment.