Fix some type hints

This commit is contained in:
Lonami Exo 2019-05-11 20:12:57 +02:00
parent c1be0bd2e8
commit 4ca3517e22
2 changed files with 4 additions and 3 deletions

View File

@ -139,7 +139,7 @@ class DownloadMethods(UserMethods):
file: '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.
@ -232,7 +232,7 @@ class DownloadMethods(UserMethods):
part_size_kb: float = None,
file_size: int = 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.

View File

@ -45,7 +45,8 @@ FileLike = typing.Union[
bytes,
io.IOBase,
types.TypeMessageMedia,
types.TypeInputFile
types.TypeInputFile,
types.TypeInputFileLocation
]
OutFileLike = typing.Union[