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, 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.

View File

@ -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[