From 837e9d29649dcaea7e72f7a07f1ef9bcbe6f68e5 Mon Sep 17 00:00:00 2001 From: Noam Meltzer Date: Tue, 4 Oct 2016 02:06:45 +0300 Subject: [PATCH] Animation: use explicit keyword args + added documentation --- telegram/animation.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/telegram/animation.py b/telegram/animation.py index 371d1ec96..813f8f806 100644 --- a/telegram/animation.py +++ b/telegram/animation.py @@ -22,8 +22,26 @@ from telegram import TelegramObject class Animation(TelegramObject): + """This object represents a Telegram Animation. - def __init__(self, file_id, **kwargs): + Attributes: + file_id (str): Unique file identifier. + + Keyword Args: + thumb (Optional[:class:`telegram.PhotoSize`]): Animation thumbnail as defined by sender. + file_name (Optional[str]): Original animation filename as defined by sender. + mime_type (Optional[str]): MIME type of the file as defined by sender. + file_size (Optional[int]): File size. + + """ + + def __init__(self, + file_id, + thumb=None, + file_name=None, + mime_type=None, + file_size=None, + **kwargs): self.file_id = file_id self.thumb = kwargs.get('thumb') self.file_name = kwargs.get('file_name')