fix(userbot): add missing safone.py imports, apply ruff --unsafe-fixes
- Add missing aiohttp, PIL, BytesIO imports to safone.py (F821 runtime bugs) - Apply ruff --unsafe-fixes (27 fixes): ternary operators, .get() patterns, contextlib.suppress, enumerate(), collapsible if/else, remove .keys()
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ async def pdf2md(client: Client, message: Message):
|
||||
if not message.reply_to_message.document:
|
||||
await message.edit('Reply to a pdf file')
|
||||
return
|
||||
if not message.reply_to_message.document.mime_type == 'application/pdf':
|
||||
if message.reply_to_message.document.mime_type != 'application/pdf':
|
||||
await message.edit('Reply to a pdf file')
|
||||
return
|
||||
if gemini_key == '':
|
||||
|
||||
Reference in New Issue
Block a user