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