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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user