From 773376ee215b6e73a39089f23c931f9d5930f580 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sun, 23 Jul 2017 18:38:27 +0200 Subject: [PATCH] Fix two more spelling mistakes --- telethon/telegram_client.py | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index a5928715..f9986711 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -570,11 +570,13 @@ class TelegramClient(TelegramBareClient): file, add_extension=False, progress_callback=None): - """Downloads MessageMediaPhoto's largest size into the desired - file(a stream or str), optionally finding its extension automatically - The progress_callback should be a callback function which takes two parameters, - uploaded size (in bytes) and total file size (in bytes). - This will be called every time a part is downloaded""" + """Downloads MessageMediaPhoto's largest size into the desired file + (a stream or str), optionally finding its extension automatically. + + The progress_callback should be a callback function which takes + two parameters, uploaded size and total file size (both in bytes). + This will be called every time a part is downloaded + """ # Determine the photo and its largest size photo = message_media_photo.photo @@ -603,12 +605,15 @@ class TelegramClient(TelegramBareClient): file=None, add_extension=True, progress_callback=None): - """Downloads the given MessageMediaDocument into the desired - file(a stream or str), optionally finding its extension automatically. - If no file_path is given, it will try to be guessed from the document - The progress_callback should be a callback function which takes two parameters, - uploaded size (in bytes) and total file size (in bytes). - This will be called every time a part is downloaded""" + """Downloads the given MessageMediaDocument into the desired file + (a stream or str), optionally finding its extension automatically. + + If no file_path is given it will try to be guessed from the document. + + The progress_callback should be a callback function which takes + two parameters, uploaded size and total file size (both in bytes). + This will be called every time a part is downloaded + """ document = message_media_document.document file_size = document.size