style: format code with black and isort (#273)

Format code with black and isort

This commit fixes the style issues introduced in 45e3899 according to the output
from Black and isort.

Details: None

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
deepsource-autofix[bot] 2023-08-26 22:09:45 +07:00 committed by GitHub
parent 45e38993f9
commit 420c0536e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 8 deletions

View file

@ -150,9 +150,7 @@ async def genss(self: Client, ctx: Message, strings):
progress_args=(strings("dl_progress"), process, c_time, dc_id),
)
except FileNotFoundError:
return await process.edit_msg(
"ERROR: FileNotFound."
)
return await process.edit_msg("ERROR: FileNotFound.")
the_real_download_location = os.path.join("downloads/", os.path.basename(dl))
if the_real_download_location is not None:
try:

View file

@ -51,9 +51,7 @@ async def mediainfo(_, ctx: Message, strings):
progress_args=(strings("dl_args_text"), process, c_time, dc_id),
)
except FileNotFoundError:
return await process.edit_msg(
"ERROR: FileNotFound."
)
return await process.edit_msg("ERROR: FileNotFound.")
file_path = path.join("downloads/", path.basename(dl))
output_ = await runcmd(f'mediainfo "{file_path}"')
out = output_[0] if len(output_) != 0 else None

View file

@ -7,7 +7,6 @@
import asyncio
import html
import httpx
import json
import os
import traceback
@ -15,6 +14,7 @@ from logging import getLogger
from urllib.parse import quote
import aiohttp
import httpx
from bs4 import BeautifulSoup
from deep_translator import GoogleTranslator
from gtts import gTTS
@ -228,7 +228,8 @@ async def gsearch(_, message):
parse = json.loads(arr)
total = len(parse)
res = "".join(
f"<a href='{i['link']}'>{i['title']}</a>\n{html.escape(i['snippet'])}\n\n" for i in parse
f"<a href='{i['link']}'>{i['title']}</a>\n{html.escape(i['snippet'])}\n\n"
for i in parse
)
except Exception:
exc = traceback.format_exc()