Skip to content

Commit 26ef8ea

Browse files
committed
Revert to the old style
1 parent a13707a commit 26ef8ea

38 files changed

+338
-74
lines changed

pyrogram/client/types/bots/callback_query.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,16 @@ class CallbackQuery(PyrogramType):
5656
5757
"""
5858

59-
def __init__(self, *, client, id: str, from_user, chat_instance: str, message=None,
60-
inline_message_id: str = None, data: bytes = None, game_short_name: str = None):
59+
def __init__(self,
60+
*,
61+
client,
62+
id: str,
63+
from_user,
64+
chat_instance: str,
65+
message=None,
66+
inline_message_id: str = None,
67+
data: bytes = None,
68+
game_short_name: str = None):
6169
super().__init__(client)
6270

6371
self.id = id

pyrogram/client/types/bots/force_reply.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class ForceReply(PyrogramType):
3333
2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
3434
"""
3535

36-
def __init__(self, selective: bool = None):
36+
def __init__(self,
37+
selective: bool = None):
3738
super().__init__(None)
3839

3940
self.selective = selective

pyrogram/client/types/bots/inline_keyboard_button.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ class InlineKeyboardButton(PyrogramType):
5353

5454
# TODO: Add callback_game and pay fields
5555

56-
def __init__(self, text: str, callback_data: bytes = None, url: str = None,
57-
switch_inline_query: str = None, switch_inline_query_current_chat: str = None):
56+
def __init__(self,
57+
text: str,
58+
callback_data: bytes = None,
59+
url: str = None,
60+
switch_inline_query: str = None,
61+
switch_inline_query_current_chat: str = None):
5862
super().__init__(None)
5963

6064
self.text = text

pyrogram/client/types/bots/inline_keyboard_markup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class InlineKeyboardMarkup(PyrogramType):
2929
List of button rows, each represented by a List of InlineKeyboardButton objects.
3030
"""
3131

32-
def __init__(self, inline_keyboard: list):
32+
def __init__(self,
33+
inline_keyboard: list):
3334
super().__init__(None)
3435

3536
self.inline_keyboard = inline_keyboard

pyrogram/client/types/bots/keyboard_button.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ class KeyboardButton(PyrogramType):
4040
Available in private chats only.
4141
"""
4242

43-
def __init__(self, text: str, request_contact: bool = None, request_location: bool = None):
43+
def __init__(self,
44+
text: str,
45+
request_contact: bool = None,
46+
request_location: bool = None):
4447
super().__init__(None)
4548

4649
self.text = text

pyrogram/client/types/bots/reply_keyboard_markup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ class ReplyKeyboardMarkup(PyrogramType):
4747
select the new language. Other users in the group don't see the keyboard.
4848
"""
4949

50-
def __init__(self, keyboard: list, resize_keyboard: bool = None, one_time_keyboard: bool = None,
50+
def __init__(self,
51+
keyboard: list,
52+
resize_keyboard: bool = None,
53+
one_time_keyboard: bool = None,
5154
selective: bool = None):
5255
super().__init__(None)
5356

pyrogram/client/types/bots/reply_keyboard_remove.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class ReplyKeyboardRemove(PyrogramType):
3535
keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.
3636
"""
3737

38-
def __init__(self, selective: bool = None):
38+
def __init__(self,
39+
selective: bool = None):
3940
super().__init__(None)
4041

4142
self.selective = selective

pyrogram/client/types/input_media/input_media.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818

1919

2020
class InputMedia:
21-
def __init__(self, media: str, caption: str, parse_mode: str):
21+
def __init__(self,
22+
media: str,
23+
caption: str,
24+
parse_mode: str):
2225
self.media = media
2326
self.caption = caption
2427
self.parse_mode = parse_mode

pyrogram/client/types/input_media/input_media_animation.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@ class InputMediaAnimation(InputMedia):
5252
Animation duration.
5353
"""
5454

55-
def __init__(self, media: str, thumb: str = None, caption: str = "", parse_mode: str = "", width: int = 0,
56-
height: int = 0, duration: int = 0):
55+
def __init__(self,
56+
media: str,
57+
thumb: str = None,
58+
caption: str = "",
59+
parse_mode: str = "",
60+
width: int = 0,
61+
height: int = 0,
62+
duration: int = 0):
5763
super().__init__(media, caption, parse_mode)
5864

5965
self.thumb = thumb

pyrogram/client/types/input_media/input_media_audio.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,14 @@ class InputMediaAudio(InputMedia):
5353
Title of the audio
5454
"""
5555

56-
def __init__(self, media: str, thumb: str = None, caption: str = "", parse_mode: str = "", duration: int = 0,
57-
performer: int = "", title: str = ""):
56+
def __init__(self,
57+
media: str,
58+
thumb: str = None,
59+
caption: str = "",
60+
parse_mode: str = "",
61+
duration: int = 0,
62+
performer: int = "",
63+
title: str = ""):
5864
super().__init__(media, caption, parse_mode)
5965

6066
self.thumb = thumb

0 commit comments

Comments
 (0)