From 7b07338851e14c728f74f01a8279b885349a96c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Y=C3=B3Un=C7=8Ei?= Date: Sun, 16 Feb 2025 23:37:40 +0300 Subject: [PATCH] Docs: Fix annotations (#1634) * Docs: Fix annotations * Add file CHANGES/1634.doc.rst --- CHANGES/1634.doc.rst | 1 + docs/dispatcher/class_based_handlers/base.rst | 2 +- .../uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 CHANGES/1634.doc.rst diff --git a/CHANGES/1634.doc.rst b/CHANGES/1634.doc.rst new file mode 100644 index 00000000..aa9cb5b9 --- /dev/null +++ b/CHANGES/1634.doc.rst @@ -0,0 +1 @@ +Update :code:`data: Dict[Any, str]` to :code:`data: Dict[str, Any]` diff --git a/docs/dispatcher/class_based_handlers/base.rst b/docs/dispatcher/class_based_handlers/base.rst index 8c694d4f..72b06e33 100644 --- a/docs/dispatcher/class_based_handlers/base.rst +++ b/docs/dispatcher/class_based_handlers/base.rst @@ -12,7 +12,7 @@ By default you will need to override only method :code:`async def handle(self) - This class also has a default initializer and you don't need to change it. The initializer accepts the incoming event and all contextual data, which -can be accessed from the handler through attributes: :code:`event: TelegramEvent` and :code:`data: Dict[Any, str]` +can be accessed from the handler through attributes: :code:`event: TelegramEvent` and :code:`data: Dict[str, Any]` If an instance of the bot is specified in context data or current context it can be accessed through *bot* class attribute. diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po index 632ef480..942af74c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po @@ -47,12 +47,12 @@ msgid "" "This class also has a default initializer and you don't need to change " "it. The initializer accepts the incoming event and all contextual data, " "which can be accessed from the handler through attributes: :code:`event: " -"TelegramEvent` and :code:`data: Dict[Any, str]`" +"TelegramEvent` and :code:`data: Dict[str, Any]`" msgstr "" "Цей клас також має ініціалізатор за замовчуванням, і вам не потрібно його" " змінювати. Ініціалізатор приймає поточну подію та всі контекстні дані, " "доступ до яких можна отримати з обробника через атрибути: :code:`event: " -"TelegramEvent` and :code:`data: Dict[Any, str]`" +"TelegramEvent` and :code:`data: Dict[str, Any]`" #: ../../dispatcher/class_based_handlers/base.rst:17 #, fuzzy