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
-3
@@ -484,9 +484,7 @@ async def unload_module(module_name: str, client: Client) -> bool:
|
||||
|
||||
def no_prefix(handler):
|
||||
def func(_, __, message):
|
||||
if message.text and not message.text.startswith(handler):
|
||||
return True
|
||||
return False
|
||||
return bool(message.text and not message.text.startswith(handler))
|
||||
|
||||
return filters.create(func)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user