diff --git a/aiogram/dispatcher/filters/builtin.py b/aiogram/dispatcher/filters/builtin.py index 7a21ca3f..ebd38f08 100644 --- a/aiogram/dispatcher/filters/builtin.py +++ b/aiogram/dispatcher/filters/builtin.py @@ -4,7 +4,7 @@ import typing import warnings from contextvars import ContextVar from dataclasses import dataclass, field -from typing import Any, Dict, Iterable, List, Optional, Union +from typing import Any, Dict, Iterable, Optional, Union from babel.support import LazyProxy diff --git a/aiogram/types/base.py b/aiogram/types/base.py index 5ef774dd..3f8cda60 100644 --- a/aiogram/types/base.py +++ b/aiogram/types/base.py @@ -78,7 +78,7 @@ class TelegramObject(ContextInstanceMixin, metaclass=MetaTelegramObject): Abstract class for telegram objects """ - def __init__(self, conf: typing.Dict[str, typing.Any]=None, **kwargs: typing.Any) -> None: + def __init__(self, conf: typing.Dict[str, typing.Any] = None, **kwargs: typing.Any) -> None: """ Deserialize object diff --git a/aiogram/types/bot_command.py b/aiogram/types/bot_command.py index 39e38e4f..996d1735 100644 --- a/aiogram/types/bot_command.py +++ b/aiogram/types/bot_command.py @@ -12,4 +12,4 @@ class BotCommand(base.TelegramObject): description: base.String = fields.Field() def __init__(self, command: base.String, description: base.String): - super(BotCommand, self).__init__(command=command, description=description) \ No newline at end of file + super(BotCommand, self).__init__(command=command, description=description) diff --git a/aiogram/types/message.py b/aiogram/types/message.py index c95b14b1..8c5d5d3a 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -3039,10 +3039,10 @@ class ContentType(helper.Helper): GROUP_CHAT_CREATED = helper.Item() # group_chat_created PASSPORT_DATA = helper.Item() # passport_data PROXIMITY_ALERT_TRIGGERED = helper.Item() # proximity_alert_triggered - VOICE_CHAT_SCHEDULED = helper.Item() # voice_chat_scheduled - VOICE_CHAT_STARTED = helper.Item() # voice_chat_started - VOICE_CHAT_ENDED = helper.Item() # voice_chat_ended - VOICE_CHAT_PARTICIPANTS_INVITED = helper.Item() # voice_chat_participants_invited + VOICE_CHAT_SCHEDULED = helper.Item() # voice_chat_scheduled + VOICE_CHAT_STARTED = helper.Item() # voice_chat_started + VOICE_CHAT_ENDED = helper.Item() # voice_chat_ended + VOICE_CHAT_PARTICIPANTS_INVITED = helper.Item() # voice_chat_participants_invited UNKNOWN = helper.Item() # unknown ANY = helper.Item() # any diff --git a/aiogram/types/message_entity.py b/aiogram/types/message_entity.py index 9ee98c11..b2aaf425 100644 --- a/aiogram/types/message_entity.py +++ b/aiogram/types/message_entity.py @@ -48,12 +48,12 @@ class MessageEntity(base.TelegramObject): :return: part of text """ if sys.maxunicode == 0xFFFF: - return text[self.offset : self.offset + self.length] + return text[self.offset: self.offset + self.length] entity_text = ( text.encode("utf-16-le") if not isinstance(text, bytes) else text ) - entity_text = entity_text[self.offset * 2 : (self.offset + self.length) * 2] + entity_text = entity_text[self.offset * 2: (self.offset + self.length) * 2] return entity_text.decode("utf-16-le") @deprecated( diff --git a/aiogram/types/reply_keyboard.py b/aiogram/types/reply_keyboard.py index 8455aff6..47efdbbe 100644 --- a/aiogram/types/reply_keyboard.py +++ b/aiogram/types/reply_keyboard.py @@ -129,7 +129,9 @@ class KeyboardButton(base.TelegramObject): class ReplyKeyboardRemove(base.TelegramObject): """ - Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). + Upon receiving a message with this object, Telegram clients will remove the current custom keyboard + and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. + An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). https://core.telegram.org/bots/api#replykeyboardremove """ diff --git a/aiogram/types/sticker.py b/aiogram/types/sticker.py index ea222831..afaeb31c 100644 --- a/aiogram/types/sticker.py +++ b/aiogram/types/sticker.py @@ -41,8 +41,6 @@ class Sticker(base.TelegramObject, mixins.Downloadable): Source: https://core.telegram.org/bots/api#deletestickerfromset - :param sticker: File identifier of the sticker - :type sticker: :obj:`base.String` :return: Returns True on success :rtype: :obj:`base.Boolean` """ diff --git a/aiogram/types/voice_chat_scheduled.py b/aiogram/types/voice_chat_scheduled.py index c134eb0f..60655ebf 100644 --- a/aiogram/types/voice_chat_scheduled.py +++ b/aiogram/types/voice_chat_scheduled.py @@ -2,7 +2,6 @@ from datetime import datetime from . import base from . import fields -from .user import User class VoiceChatScheduled(base.TelegramObject):