chore(userbot): apply ruff check --fix and ruff format
- ruff check --fix: 210 auto-fixed errors (import sorting, trailing whitespace, unused imports, f-string fixups, deprecated annotations) - ruff format: 104 files reformatted to consistent style - 268 non-auto-fixable issues remain (S113 requests timeout, etc.)
This commit is contained in:
@@ -2,20 +2,16 @@ from asyncio import sleep
|
||||
|
||||
from pyrogram import Client, filters
|
||||
from pyrogram.types import Message
|
||||
|
||||
from utils.misc import modules_help, prefix
|
||||
|
||||
digits = {
|
||||
str(i): el
|
||||
for i, el in enumerate(["0️⃣", "1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣"])
|
||||
}
|
||||
digits = {str(i): el for i, el in enumerate(['0️⃣', '1️⃣', '2️⃣', '3️⃣', '4️⃣', '5️⃣', '6️⃣', '7️⃣', '8️⃣', '9️⃣'])}
|
||||
|
||||
|
||||
def prettify(val: int) -> str:
|
||||
return "".join(digits[i] for i in str(val))
|
||||
return ''.join(digits[i] for i in str(val))
|
||||
|
||||
|
||||
@Client.on_message(filters.command("ghoul", prefix) & filters.me)
|
||||
@Client.on_message(filters.command('ghoul', prefix) & filters.me)
|
||||
async def ghoul_counter(_, message: Message):
|
||||
await message.delete()
|
||||
|
||||
@@ -33,9 +29,7 @@ async def ghoul_counter(_, message: Message):
|
||||
await msg.edit(prettify(counter))
|
||||
await sleep(1)
|
||||
|
||||
await msg.edit("<b>🤡 GHOUL 🤡</b>")
|
||||
await msg.edit('<b>🤡 GHOUL 🤡</b>')
|
||||
|
||||
|
||||
modules_help["1000-7"] = {
|
||||
"ghoul [count_from]": "counting from 1000 (or given [count_from] to 0 as a ghoul"
|
||||
}
|
||||
modules_help['1000-7'] = {'ghoul [count_from]': 'counting from 1000 (or given [count_from] to 0 as a ghoul'}
|
||||
|
||||
Reference in New Issue
Block a user