Skip to content

Commit 3e18945

Browse files
committed
Reformat code
1 parent bdb0395 commit 3e18945

File tree

117 files changed

+974
-802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+974
-802
lines changed

pyrogram/api/errors/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
# You should have received a copy of the GNU Lesser General Public License
1717
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818

19-
from .exceptions import *
2019
from .error import UnknownError
20+
from .exceptions import *

pyrogram/client/methods/bots/answer_callback_query.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@
2121

2222

2323
class AnswerCallbackQuery(BaseClient):
24-
def answer_callback_query(self,
25-
callback_query_id: str,
26-
text: str = None,
27-
show_alert: bool = None,
28-
url: str = None,
29-
cache_time: int = 0):
24+
def answer_callback_query(
25+
self,
26+
callback_query_id: str,
27+
text: str = None,
28+
show_alert: bool = None,
29+
url: str = None,
30+
cache_time: int = 0
31+
):
3032
"""Use this method to send answers to callback queries sent from inline keyboards.
3133
The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
3234

pyrogram/client/methods/bots/get_game_high_scores.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424

2525

2626
class GetGameHighScores(BaseClient):
27-
def get_game_high_scores(self,
28-
user_id: Union[int, str],
29-
chat_id: Union[int, str],
30-
message_id: int = None):
27+
def get_game_high_scores(
28+
self,
29+
user_id: Union[int, str],
30+
chat_id: Union[int, str],
31+
message_id: int = None
32+
):
3133
"""Use this method to get data for high score tables.
3234
3335
Args:

pyrogram/client/methods/bots/get_inline_bot_results.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424

2525

2626
class GetInlineBotResults(BaseClient):
27-
def get_inline_bot_results(self,
28-
bot: Union[int, str],
29-
query: str,
30-
offset: str = "",
31-
latitude: float = None,
32-
longitude: float = None):
27+
def get_inline_bot_results(
28+
self,
29+
bot: Union[int, str],
30+
query: str,
31+
offset: str = "",
32+
latitude: float = None,
33+
longitude: float = None
34+
):
3335
"""Use this method to get bot results via inline queries.
3436
You can then send a result using :obj:`send_inline_bot_result <pyrogram.Client.send_inline_bot_result>`
3537

pyrogram/client/methods/bots/request_callback_answer.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323

2424

2525
class RequestCallbackAnswer(BaseClient):
26-
def request_callback_answer(self,
27-
chat_id: Union[int, str],
28-
message_id: int,
29-
callback_data: bytes):
26+
def request_callback_answer(
27+
self,
28+
chat_id: Union[int, str],
29+
message_id: int,
30+
callback_data: bytes
31+
):
3032
"""Use this method to request a callback answer from bots. This is the equivalent of clicking an
3133
inline button containing callback data.
3234

pyrogram/client/methods/bots/send_game.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,19 @@
2424

2525

2626
class SendGame(BaseClient):
27-
def send_game(self,
28-
chat_id: Union[int, str],
29-
game_short_name: str,
30-
disable_notification: bool = None,
31-
reply_to_message_id: int = None,
32-
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
33-
"pyrogram.ReplyKeyboardMarkup",
34-
"pyrogram.ReplyKeyboardRemove",
35-
"pyrogram.ForceReply"] = None) -> "pyrogram.Message":
27+
def send_game(
28+
self,
29+
chat_id: Union[int, str],
30+
game_short_name: str,
31+
disable_notification: bool = None,
32+
reply_to_message_id: int = None,
33+
reply_markup: Union[
34+
"pyrogram.InlineKeyboardMarkup",
35+
"pyrogram.ReplyKeyboardMarkup",
36+
"pyrogram.ReplyKeyboardRemove",
37+
"pyrogram.ForceReply"
38+
] = None
39+
) -> "pyrogram.Message":
3640
"""Use this method to send a game.
3741
3842
Args:

pyrogram/client/methods/bots/send_inline_bot_result.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@
2323

2424

2525
class SendInlineBotResult(BaseClient):
26-
def send_inline_bot_result(self,
27-
chat_id: Union[int, str],
28-
query_id: int,
29-
result_id: str,
30-
disable_notification: bool = None,
31-
reply_to_message_id: int = None,
32-
hide_via: bool = None):
26+
def send_inline_bot_result(
27+
self,
28+
chat_id: Union[int, str],
29+
query_id: int,
30+
result_id: str,
31+
disable_notification: bool = None,
32+
reply_to_message_id: int = None,
33+
hide_via: bool = None
34+
):
3335
"""Use this method to send an inline bot result.
3436
Bot results can be retrieved using :obj:`get_inline_bot_results <pyrogram.Client.get_inline_bot_results>`
3537

pyrogram/client/methods/bots/set_game_score.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@
2424

2525

2626
class SetGameScore(BaseClient):
27-
def set_game_score(self,
28-
user_id: Union[int, str],
29-
score: int,
30-
force: bool = None,
31-
disable_edit_message: bool = None,
32-
chat_id: Union[int, str] = None,
33-
message_id: int = None):
27+
def set_game_score(
28+
self,
29+
user_id: Union[int, str],
30+
score: int,
31+
force: bool = None,
32+
disable_edit_message: bool = None,
33+
chat_id: Union[int, str] = None,
34+
message_id: int = None
35+
):
3436
# inline_message_id: str = None): TODO Add inline_message_id
3537
"""Use this method to set the score of the specified user in a game.
3638

pyrogram/client/methods/chats/delete_chat_photo.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323

2424

2525
class DeleteChatPhoto(BaseClient):
26-
def delete_chat_photo(self,
27-
chat_id: Union[int, str]) -> bool:
26+
def delete_chat_photo(
27+
self,
28+
chat_id: Union[int, str]
29+
) -> bool:
2830
"""Use this method to delete a chat photo.
2931
Photos can't be changed for private chats.
3032
You must be an administrator in the chat for this to work and must have the appropriate admin rights.

pyrogram/client/methods/chats/export_chat_invite_link.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323

2424

2525
class ExportChatInviteLink(BaseClient):
26-
def export_chat_invite_link(self,
27-
chat_id: Union[int, str]) -> str:
26+
def export_chat_invite_link(
27+
self,
28+
chat_id: Union[int, str]
29+
) -> str:
2830
"""Use this method to generate a new invite link for a chat; any previously generated link is revoked.
2931
3032
You must be an administrator in the chat for this to work and have the appropriate admin rights.

0 commit comments

Comments
 (0)