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 -4
View File
@@ -89,10 +89,7 @@ async def flip(client: Client, message: Message):
text = ' '.join(message.command[1:])
final_str = ''
for char in text:
if char in REPLACEMENT_MAP:
new_char = REPLACEMENT_MAP[char]
else:
new_char = char
new_char = REPLACEMENT_MAP.get(char, char)
final_str += new_char
if text != final_str:
await message.edit(final_str)