mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Fix some type hints
This commit is contained in:
parent
c1be0bd2e8
commit
4ca3517e22
|
@ -139,7 +139,7 @@ class DownloadMethods(UserMethods):
|
||||||
file: 'hints.FileLike' = None,
|
file: 'hints.FileLike' = None,
|
||||||
*,
|
*,
|
||||||
thumb: 'hints.FileLike' = None,
|
thumb: 'hints.FileLike' = None,
|
||||||
progress_callback: 'hints.ProgressCallback' = None) -> typing.Optional[str]:
|
progress_callback: 'hints.ProgressCallback' = None) -> typing.Optional[typing.Union[str, bytes]]:
|
||||||
"""
|
"""
|
||||||
Downloads the given media from a message object.
|
Downloads the given media from a message object.
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ class DownloadMethods(UserMethods):
|
||||||
part_size_kb: float = None,
|
part_size_kb: float = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
progress_callback: 'hints.ProgressCallback' = None,
|
progress_callback: 'hints.ProgressCallback' = None,
|
||||||
dc_id: int = None) -> None:
|
dc_id: int = None) -> typing.Optional[typing.Union[str, bytes]]:
|
||||||
"""
|
"""
|
||||||
Low-level method to download files from their input location.
|
Low-level method to download files from their input location.
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,8 @@ FileLike = typing.Union[
|
||||||
bytes,
|
bytes,
|
||||||
io.IOBase,
|
io.IOBase,
|
||||||
types.TypeMessageMedia,
|
types.TypeMessageMedia,
|
||||||
types.TypeInputFile
|
types.TypeInputFile,
|
||||||
|
types.TypeInputFileLocation
|
||||||
]
|
]
|
||||||
|
|
||||||
OutFileLike = typing.Union[
|
OutFileLike = typing.Union[
|
||||||
|
|
Loading…
Reference in New Issue
Block a user