diff --git a/pyrogram/client.py b/pyrogram/client.py index cb70fe5a8..8338bcb51 100644 --- a/pyrogram/client.py +++ b/pyrogram/client.py @@ -695,16 +695,12 @@ async def handle_updates(self, updates): chats.update({c.id: c for c in diff.chats}) self.dispatcher.updates_queue.put_nowait((update, users, chats)) - elif isinstance(updates, (raw.types.UpdateShortMessage, raw.types.UpdateShortChatMessage)): + elif isinstance( + updates, (raw.types.UpdateShortMessage, raw.types.UpdateShortChatMessage) + ): if not self.skip_updates: await self.storage.update_state( - ( - 0, - updates.pts, - None, - updates.date, - None - ) + (0, updates.pts, None, updates.date, None) ) diff = await self.invoke( diff --git a/pyrogram/methods/messages/delete_messages.py b/pyrogram/methods/messages/delete_messages.py index 4513feb6f..7748dd0b7 100644 --- a/pyrogram/methods/messages/delete_messages.py +++ b/pyrogram/methods/messages/delete_messages.py @@ -28,7 +28,7 @@ async def delete_messages( chat_id: Union[int, str], message_ids: Union[int, Iterable[int]], revoke: bool = True, - is_scheduled: bool = None + is_scheduled: bool = None, ) -> int: """Delete messages, including service messages. @@ -81,8 +81,7 @@ async def delete_messages( if is_scheduled: r = await self.invoke( raw.functions.messages.DeleteScheduledMessages( - peer=peer, - id=message_ids + peer=peer, id=message_ids ) ) elif isinstance(peer, raw.types.InputPeerChannel): diff --git a/pyrogram/methods/messages/search_posts.py b/pyrogram/methods/messages/search_posts.py index 83dc2a513..6d4e62244 100644 --- a/pyrogram/methods/messages/search_posts.py +++ b/pyrogram/methods/messages/search_posts.py @@ -71,11 +71,11 @@ async def search_posts( offset_rate=offset_date, offset_peer=offset_peer, offset_id=offset_id, - limit=limit + limit=limit, ), - sleep_threshold=60 + sleep_threshold=60, ), - replies=0 + replies=0, ) if not messages: diff --git a/pyrogram/methods/messages/search_posts_count.py b/pyrogram/methods/messages/search_posts_count.py index 5dc47839d..cf4cff771 100644 --- a/pyrogram/methods/messages/search_posts_count.py +++ b/pyrogram/methods/messages/search_posts_count.py @@ -44,7 +44,7 @@ async def search_posts_count( offset_rate=0, offset_peer=raw.types.InputPeerEmpty(), offset_id=0, - limit=1 + limit=1, ) )