X Tutup
Skip to content

Commit 59fa717

Browse files
committed
Documentation improvements + small style fixes
1 parent 31cab0d commit 59fa717

20 files changed

+476
-588
lines changed

telegram/audio.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@ class Audio(TelegramObject):
3535
Args:
3636
file_id (str):
3737
duration (int):
38-
**kwargs: Arbitrary keyword arguments.
39-
40-
Keyword Args:
4138
performer (Optional[str]):
4239
title (Optional[str]):
4340
mime_type (Optional[str]):
4441
file_size (Optional[int]):
42+
**kwargs: Arbitrary keyword arguments.
43+
4544
"""
4645

4746
def __init__(self,

telegram/bot.py

Lines changed: 354 additions & 527 deletions
Large diffs are not rendered by default.

telegram/chat.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ class Chat(TelegramObject):
3636
Args:
3737
id (int):
3838
type (str):
39-
**kwargs: Arbitrary keyword arguments.
40-
41-
Keyword Args:
42-
type (Optional[str]):
39+
title (Optional[str]):
40+
username(Optional[str]):
41+
first_name(Optional[str]):
42+
last_name(Optional[str]):
4343
bot (Optional[Bot]): The Bot to use for instance methods
44-
"""
44+
**kwargs (dict): Arbitrary keyword arguments.
4545
46+
"""
4647
PRIVATE = 'private'
4748
GROUP = 'group'
4849
SUPERGROUP = 'supergroup'

telegram/chatmember.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ class ChatMember(TelegramObject):
3232
Args:
3333
user (:class:`telegram.User`):
3434
status (str):
35-
"""
35+
**kwargs (dict): Arbitrary keyword arguments.
3636
37+
"""
3738
CREATOR = 'creator'
3839
ADMINISTRATOR = 'administrator'
3940
MEMBER = 'member'

telegram/choseninlineresult.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,16 @@ class ChosenInlineResult(TelegramObject):
3333
result_id (str):
3434
from_user (:class:`telegram.User`):
3535
query (str):
36+
location (:class:`telegram.Location`):
37+
inline_message_id (str):
3638
3739
Args:
3840
result_id (str):
3941
from_user (:class:`telegram.User`):
4042
query (str):
43+
location (Optional[:class:`telegram.Location`]):
44+
inline_message_id (Optional[str]):
45+
**kwargs (dict): Arbitrary keyword arguments.
4146
4247
"""
4348

telegram/contact.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ class Contact(TelegramObject):
3333
Args:
3434
phone_number (str):
3535
first_name (str):
36-
**kwargs: Arbitrary keyword arguments.
37-
38-
Keyword Args:
3936
last_name (Optional[str]):
4037
user_id (Optional[int]):
38+
**kwargs: Arbitrary keyword arguments.
39+
4140
"""
4241

4342
def __init__(self, phone_number, first_name, last_name='', user_id=0, **kwargs):

telegram/document.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,12 @@ class Document(TelegramObject):
3333
3434
Args:
3535
file_id (str):
36-
**kwargs: Arbitrary keyword arguments.
37-
38-
Keyword Args:
3936
thumb (Optional[:class:`telegram.PhotoSize`]):
4037
file_name (Optional[str]):
4138
mime_type (Optional[str]):
4239
file_size (Optional[int]):
40+
**kwargs (dict): Arbitrary keyword arguments.
41+
4342
"""
4443

4544
def __init__(self, file_id, thumb=None, file_name='', mime_type='', file_size=0, **kwargs):

telegram/file.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ class File(TelegramObject):
3434
Args:
3535
file_id (str):
3636
bot (telegram.Bot):
37-
**kwargs: Arbitrary keyword arguments.
38-
39-
Keyword Args:
4037
file_size (Optional[int]):
4138
file_path (Optional[str]):
39+
**kwargs (dict): Arbitrary keyword arguments.
4240
4341
"""
4442

telegram/forcereply.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ class ForceReply(ReplyMarkup):
3030
3131
Args:
3232
force_reply (bool):
33-
**kwargs: Arbitrary keyword arguments.
34-
35-
Keyword Args:
3633
selective (Optional[bool]):
34+
**kwargs (dict): Arbitrary keyword arguments.
35+
3736
"""
3837

3938
def __init__(self, force_reply=True, selective=False, **kwargs):

telegram/inlinekeyboardbutton.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ class InlineKeyboardButton(TelegramObject):
3333
3434
Args:
3535
text (str):
36-
**kwargs: Arbitrary keyword arguments.
37-
38-
Keyword Args:
3936
url (Optional[str]):
4037
callback_data (Optional[str]):
4138
switch_inline_query (Optional[str]):
39+
**kwargs (dict): Arbitrary keyword arguments.
4240
4341
"""
4442

0 commit comments

Comments
 (0)
X Tutup