From 8c03f0e2eb3d97219b11f7a9618a3b63e94f210b Mon Sep 17 00:00:00 2001 From: Poolitzer Date: Wed, 23 Nov 2022 13:21:10 +0100 Subject: [PATCH] Fix Return Value Annotation of `Chat.create_forum_topic` (#3381) Co-authored-by: Dmitry Kolomatskiy <58207913+lemontree210@users.noreply.github.com> --- telegram/_chat.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/telegram/_chat.py b/telegram/_chat.py index 3acf2d9e3..33fba0cf0 100644 --- a/telegram/_chat.py +++ b/telegram/_chat.py @@ -26,6 +26,7 @@ from telegram import constants from telegram._chatlocation import ChatLocation from telegram._chatpermissions import ChatPermissions from telegram._files.chatphoto import ChatPhoto +from telegram._forumtopic import ForumTopic from telegram._menubutton import MenuButton from telegram._telegramobject import TelegramObject from telegram._utils import enum @@ -2628,7 +2629,7 @@ class Chat(TelegramObject): connect_timeout: ODVInput[float] = DEFAULT_NONE, pool_timeout: ODVInput[float] = DEFAULT_NONE, api_kwargs: JSONDict = None, - ) -> bool: + ) -> ForumTopic: """Shortcut for:: await bot.create_forum_topic(chat_id=update.effective_chat.id, *args, **kwargs) @@ -2639,7 +2640,7 @@ class Chat(TelegramObject): .. versionadded:: 20.0 Returns: - :obj:`bool`: On success, :obj:`True` is returned. + :class:`telegram.ForumTopic` """ return await self.get_bot().create_forum_topic( chat_id=self.id,