style: format code with black and isort (#257)

Format code with black and isort

This commit fixes the style issues introduced in f251dae according to the output
from Black and isort.

Details: https://app.deepsource.com/gh/yasirarism/MissKatyPyro/transform/831b283d-758d-4875-8d5b-94dbcbe0231a/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
deepsource-autofix[bot] 2023-08-06 22:41:41 +07:00 committed by GitHub
parent f251daeb74
commit 87ff57503c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View file

@ -28,7 +28,12 @@ from logging import getLogger
from time import time
from pyrogram import Client, enums, filters
from pyrogram.errors import ChatAdminRequired, FloodWait, PeerIdInvalid, UsernameNotOccupied
from pyrogram.errors import (
ChatAdminRequired,
FloodWait,
PeerIdInvalid,
UsernameNotOccupied,
)
from pyrogram.types import ChatPermissions, ChatPrivileges, Message
from database.warn_db import add_warn, get_warn, remove_warns

View file

@ -24,7 +24,7 @@ SOFTWARE.
import asyncio
from pyrogram import filters
from pyrogram.errors import ChatNotModified, FloodWait, ChatAdminRequired
from pyrogram.errors import ChatAdminRequired, ChatNotModified, FloodWait
from pyrogram.types import ChatPermissions
from misskaty import app
@ -138,7 +138,9 @@ async def locks_func(_, message):
await app.set_chat_permissions(chat_id, ChatPermissions())
await message.reply_text(f"Locked Everything in {message.chat.title}")
except ChatAdminRequired:
await message.reply_msg("Give me proper admin permission to use this command.")
await message.reply_msg(
"Give me proper admin permission to use this command."
)
elif parameter == "all" and state == "unlock":
try:
@ -157,7 +159,9 @@ async def locks_func(_, message):
)
await message.reply(f"Unlocked Everything in {message.chat.title}")
except ChatAdminRequired:
await message.reply_msg("Give me full admin permission to use this command.")
await message.reply_msg(
"Give me full admin permission to use this command."
)
@app.on_message(filters.command("locks", COMMAND_HANDLER) & ~filters.private)