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:
2026-06-19 12:19:01 +02:00
parent 95cec59263
commit 7ba6bc44f2
104 changed files with 4338 additions and 5319 deletions
+12 -16
View File
@@ -1,14 +1,12 @@
# original module https://raw.githubusercontent.com/KeyZenD/modules/master/MirrorFlipV2.py | t.me/the_kzd
import os
from pyrogram import Client, filters, enums
from pyrogram import Client, enums, filters
from pyrogram.types import Message
from utils.misc import modules_help, prefix
from utils.scripts import import_library
PIL = import_library("PIL", "pillow")
PIL = import_library('PIL', 'pillow')
from PIL import Image, ImageOps
@@ -19,7 +17,7 @@ async def make(client, message, o):
downloads = await client.download_media(reply.photo.file_id)
else:
downloads = await client.download_media(reply.sticker.file_id)
path = f"{downloads}"
path = f'{downloads}'
img = Image.open(path)
await message.delete()
w, h = img.size
@@ -41,21 +39,19 @@ async def make(client, message, o):
return await reply.reply_sticker(sticker=path)
os.remove(path)
return await message.edit(
"<b>Need to answer the photo/sticker</b>", parse_mode=enums.ParseMode.HTML
)
return await message.edit('<b>Need to answer the photo/sticker</b>', parse_mode=enums.ParseMode.HTML)
@Client.on_message(filters.command(["ll", "rr", "dd", "uu"], prefix) & filters.me)
@Client.on_message(filters.command(['ll', 'rr', 'dd', 'uu'], prefix) & filters.me)
async def mirror_flip(client: Client, message: Message):
await message.edit("<b>Processing...</b>", parse_mode=enums.ParseMode.HTML)
param = {"ll": 1, "rr": 2, "dd": 3, "uu": 4}[message.command[0]]
await message.edit('<b>Processing...</b>', parse_mode=enums.ParseMode.HTML)
param = {'ll': 1, 'rr': 2, 'dd': 3, 'uu': 4}[message.command[0]]
await make(client, message, param)
modules_help["mirror_flip"] = {
"ll [reply on photo or sticker]*": "reflects the left side",
"rr [reply on photo or sticker]*": "reflects the right side",
"uu [reply on photo or sticker]*": "reflects the top",
"dd [reply on photo or sticker]*": "reflects the bottom",
modules_help['mirror_flip'] = {
'll [reply on photo or sticker]*': 'reflects the left side',
'rr [reply on photo or sticker]*': 'reflects the right side',
'uu [reply on photo or sticker]*': 'reflects the top',
'dd [reply on photo or sticker]*': 'reflects the bottom',
}