Skip to content

Commit

Permalink
black code format
Browse files Browse the repository at this point in the history
Signed-off-by: eyMarv <[email protected]>
  • Loading branch information
eyMarv committed Jun 7, 2024
1 parent 651e5e7 commit 0c670da
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
12 changes: 4 additions & 8 deletions pyrogram/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 2 additions & 3 deletions pyrogram/methods/messages/delete_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions pyrogram/methods/messages/search_posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/messages/search_posts_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def search_posts_count(
offset_rate=0,
offset_peer=raw.types.InputPeerEmpty(),
offset_id=0,
limit=1
limit=1,
)
)

Expand Down

0 comments on commit 0c670da

Please sign in to comment.