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:
2026-06-19 15:27:12 +02:00
parent fc83176522
commit 70d7855f06
20 changed files with 29 additions and 57 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ async def notes(_, message: Message):
await message.edit('<b>Loading...</b>')
text = 'Available notes:\n\n'
collection = db.get_collection('core.notes')
for note in collection.keys():
for note in collection:
if note[:4] == 'note':
text += f'<code>{note[4:]}</code>\n'
await message.edit(text)