Skip to content

Commit cc70340

Browse files
author
koval
committed
codestyle
1 parent 44693a5 commit cc70340

File tree

1 file changed

+6
-3
lines changed
  • huntflow_api_client/entities

1 file changed

+6
-3
lines changed

huntflow_api_client/entities/file.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import BinaryIO, Optional, Union
1+
from typing import BinaryIO, Optional, Union, Dict, Tuple
22

33
from huntflow_api_client.entities.base import BaseEntity
44
from huntflow_api_client.models.request.file import UploadFileHeaders
@@ -28,10 +28,13 @@ async def upload(
2828
data = {}
2929
if preset:
3030
data["preset"] = preset
31+
32+
files: Dict[str, Union[Union[bytes, BinaryIO], Tuple[str, Union[bytes, BinaryIO]]]] = {}
3133
if filename:
32-
files = {"file": (filename, file)}
34+
files["file"] = (filename, file)
3335
else:
34-
files = {"file": file}
36+
files["file"] = file
37+
3538
response = await self._api.request(
3639
"POST",
3740
f"/accounts/{account_id}/upload",

0 commit comments

Comments
 (0)