From 758ca8a2c498edd1131cfe622df7aa532670211f Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 29 Dec 2022 17:06:00 +0700 Subject: [PATCH] Format code with black (#4) * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black Co-authored-by: yasirarism Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- misskaty/__main__.py | 2 +- misskaty/plugins/dev.py | 2 +- misskaty/plugins/misc_tools.py | 6 ++++-- misskaty/plugins/stickers.py | 7 ++----- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/misskaty/__main__.py b/misskaty/__main__.py index 99eb167b..01037da7 100644 --- a/misskaty/__main__.py +++ b/misskaty/__main__.py @@ -16,7 +16,7 @@ from misskaty import ( BOT_USERNAME, UBOT_ID, UBOT_NAME, - UBOT_USERNAME + UBOT_USERNAME, ) from misskaty.plugins import ALL_MODULES from misskaty.helper import paginate_modules diff --git a/misskaty/plugins/dev.py b/misskaty/plugins/dev.py index df7e05f5..29de83a8 100644 --- a/misskaty/plugins/dev.py +++ b/misskaty/plugins/dev.py @@ -4,7 +4,7 @@ import os import traceback import asyncio from pyrogram import filters, enums -from misskaty import app, user +from misskaty import app from misskaty.vars import COMMAND_HANDLER, SUDO __MODULE__ = "DevCommand" diff --git a/misskaty/plugins/misc_tools.py b/misskaty/plugins/misc_tools.py index 148e6c47..5c080c4b 100644 --- a/misskaty/plugins/misc_tools.py +++ b/misskaty/plugins/misc_tools.py @@ -159,10 +159,12 @@ async def translate(client, message): target_lang = message.text.split(None, 2)[1] text = message.text.split(None, 2)[2] msg = await message.reply("Menerjemahkan...") - my_translator = GoogleTranslator(source='auto', target=target_lang) + my_translator = GoogleTranslator(source="auto", target=target_lang) try: result = my_translator.translate(text=text) - await msg.edit(f"Translation using source = {my_translator.source} and target = {my_translator.target}\n\n-> {result}") + await msg.edit( + f"Translation using source = {my_translator.source} and target = {my_translator.target}\n\n-> {result}" + ) except MessageTooLong: url = await rentry(tekstr.text) await msg.edit( diff --git a/misskaty/plugins/stickers.py b/misskaty/plugins/stickers.py index 650d551c..d978aedb 100644 --- a/misskaty/plugins/stickers.py +++ b/misskaty/plugins/stickers.py @@ -3,17 +3,14 @@ import shutil import tempfile import asyncio import re -import math from PIL import Image from misskaty.helper.http import http -from pyrogram import filters, emoji, enums +from pyrogram import emoji, filters from pyrogram.errors import PeerIdInvalid, StickersetInvalid, BadRequest from pyrogram.raw.functions.messages import GetStickerSet, SendMedia from pyrogram.raw.functions.stickers import AddStickerToSet, CreateStickerSet -from pyrogram.types import Message, InlineKeyboardButton, InlineKeyboardMarkup -from typing import Tuple, Callable -from functools import wraps, partial +from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup from pyrogram.raw.types import ( DocumentAttributeFilename, InputDocument,