From 3731a628856daf15d6c7ff21c41a905409203eee Mon Sep 17 00:00:00 2001 From: He <123play123.loggin@gmail.com> Date: Tue, 8 Feb 2022 07:25:15 +0700 Subject: [PATCH] Deleting deprecated CHOSEN_INLINE_QUERY (#805) * Deleting deprecated CHOSEN_INLINE_QUERY * Del from comments CHOSEN_INLINE_QUERY --- aiogram/dispatcher/dispatcher.py | 6 +++--- aiogram/types/update.py | 8 +------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 60aeed49..5b3cafd3 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -768,7 +768,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin): .. code-block:: python3 - dp.register_chosen_inline_handler(some_chosen_inline_handler, lambda chosen_inline_query: True) + dp.register_chosen_inline_handler(some_chosen_inline_handler, lambda chosen_inline_result: True) :param callback: :param state: @@ -793,8 +793,8 @@ class Dispatcher(DataMixin, ContextInstanceMixin): .. code-block:: python3 - @dp.chosen_inline_handler(lambda chosen_inline_query: True) - async def some_chosen_inline_handler(chosen_inline_query: types.ChosenInlineResult) + @dp.chosen_inline_handler(lambda chosen_inline_result: True) + async def some_chosen_inline_handler(chosen_inline_result: types.ChosenInlineResult) :param state: :param custom_filters: diff --git a/aiogram/types/update.py b/aiogram/types/update.py index 4d5a74d5..957fdfa6 100644 --- a/aiogram/types/update.py +++ b/aiogram/types/update.py @@ -11,7 +11,7 @@ from .poll import Poll, PollAnswer from .pre_checkout_query import PreCheckoutQuery from .shipping_query import ShippingQuery from .chat_join_request import ChatJoinRequest -from ..utils import helper, deprecated +from ..utils import helper class Update(base.TelegramObject): @@ -70,12 +70,6 @@ class AllowedUpdates(helper.Helper): CHAT_MEMBER = helper.ListItem() # chat_member CHAT_JOIN_REQUEST = helper.ListItem() # chat_join_request - CHOSEN_INLINE_QUERY = deprecated.DeprecatedReadOnlyClassVar( - "`CHOSEN_INLINE_QUERY` is a deprecated value for allowed update. " - "Use `CHOSEN_INLINE_RESULT`", - new_value_getter=lambda cls: cls.CHOSEN_INLINE_RESULT, - ) - @classmethod def default(cls): return []