We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22c6425 commit 8d8100aCopy full SHA for 8d8100a
1 file changed
filesender/response_types.py
@@ -1,11 +1,12 @@
1
-from typing import List, Union
+from __future__ import annotations
2
+from typing import List
3
from typing_extensions import TypedDict
4
5
class _FileBase(TypedDict):
6
id: int
7
transfer_id: int
8
name: str
- size: Union[int, str] # some FileSender servers return this as a string
9
+ size: int | str # some FileSender servers return this as a string
10
sha1: str
11
12
class _FileWithUid(_FileBase):
@@ -14,7 +15,7 @@ class _FileWithUid(_FileBase):
14
15
class _FileWithPuid(_FileBase):
16
puid: str
17
-File = Union[_FileWithUid, _FileWithPuid]
18
+File = _FileWithUid | _FileWithPuid
19
20
class Date(TypedDict):
21
raw: int
0 commit comments