From a1a30e8bbc5c952605a14f36c245694226d7dacb Mon Sep 17 00:00:00 2001 From: "Mahdi K." <106227973+m2k7m@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:36:53 +0300 Subject: [PATCH] Fix get_stories types that will help the code editor with IntelliSense --- pyrogram/methods/stories/get_stories.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyrogram/methods/stories/get_stories.py b/pyrogram/methods/stories/get_stories.py index 1e8e6e4a5b..35eab267b6 100644 --- a/pyrogram/methods/stories/get_stories.py +++ b/pyrogram/methods/stories/get_stories.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . -from typing import Union, Iterable +from typing import Union, Iterable, List import pyrogram from pyrogram import raw @@ -28,7 +28,7 @@ async def get_stories( self: "pyrogram.Client", chat_id: Union[int, str], story_ids: Union[int, Iterable[int]], - ) -> "types.Stories": + ) -> Union["types.Story", List["types.Story"]] : """Get one or more stories from a chat by using stories identifiers. .. include:: /_includes/usable-by/users.rst @@ -83,4 +83,4 @@ async def get_stories( ) ) - return types.List(stories) if is_iterable else stories[0] if stories else None + return stories if is_iterable else stories[0] if stories else None