add some skipcq rules
This commit is contained in:
@@ -43,7 +43,7 @@ async def user_exec(client: Client, message: Message):
|
||||
|
||||
try:
|
||||
with redirect_stdout(stdout):
|
||||
exec(code)
|
||||
exec(code) # skipcq
|
||||
text = (
|
||||
"<b>Code:</b>\n"
|
||||
f"<code>{code}</code>\n\n"
|
||||
@@ -68,7 +68,7 @@ async def user_eval(client: Client, message: Message):
|
||||
code = message.text.split(maxsplit=1)[1]
|
||||
|
||||
try:
|
||||
result = eval(code)
|
||||
result = eval(code) # skipcq
|
||||
await message.edit(
|
||||
"<b>Expression:</b>\n"
|
||||
f"<code>{code}</code>\n\n"
|
||||
|
||||
@@ -54,14 +54,14 @@ async def convert_to_image(message, client) -> None | str:
|
||||
cmd = (
|
||||
f"lottie_convert.py --frame 0 -if lottie -of png {path_s} {final_path}"
|
||||
)
|
||||
await exec(cmd)
|
||||
await exec(cmd) # skipcq
|
||||
elif message.reply_to_message.audio:
|
||||
thumb = message.reply_to_message.audio.thumbs[0].file_id
|
||||
final_path = await client.download_media(thumb)
|
||||
elif message.reply_to_message.video or message.reply_to_message.animation:
|
||||
final_path = "fetched_thumb.png"
|
||||
vid_path = await client.download_media(message.reply_to_message)
|
||||
await exec(f"ffmpeg -i {vid_path} -filter:v scale=500:500 -an {final_path}")
|
||||
await exec(f"ffmpeg -i {vid_path} -filter:v scale=500:500 -an {final_path}") # skipcq
|
||||
elif message.reply_to_message.document:
|
||||
if message.reply_to_message.document.mime_type == "image/jpeg":
|
||||
final_path = await message.reply_to_message.download()
|
||||
|
||||
@@ -219,7 +219,7 @@ def restart() -> None:
|
||||
music_bot_process.terminate()
|
||||
except psutil.NoSuchProcess:
|
||||
print("Music bot is not running.")
|
||||
os.execvp(sys.executable, [sys.executable, "main.py"])
|
||||
os.execvp(sys.executable, [sys.executable, "main.py"]) # skipcq
|
||||
|
||||
|
||||
def format_exc(e: Exception, suffix="") -> str:
|
||||
|
||||
Reference in New Issue
Block a user