Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
illvart committed Mar 7, 2024
1 parent 4a07352 commit 0e81caa
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 22 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@
<p align="center">
<a href="https://github.com/kastaid/getter/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/kastaid/getter/ci.yml?branch=main&logo=github&label=CI" /></a>
<a href="https://www.codefactor.io/repository/github/kastaid/getter"><img alt="CodeFactor" src="https://www.codefactor.io/repository/github/kastaid/getter/badge" /></a>
<a href="https://app.codacy.com/gh/kastaid/getter/dashboard"><img alt="Codacy grade" src="https://img.shields.io/codacy/grade/2f86ed8f8534424c8d4cdaa197dc5ce2?logo=codacy" /></a>
<a href="https://github.com/kastaid/getter/blob/main/LICENSE"><img alt="LICENSE" src="https://img.shields.io/github/license/kastaid/getter" /></a>
<br>
<img alt="Python" src="https://img.shields.io/badge/Python-3.11.x%20%7C%203.12.x-blue?logoColor=white&logo=python" />
<img alt="Version" src="https://img.shields.io/github/manifest-json/v/kastaid/getter" />
<img alt="Size" src="https://img.shields.io/github/repo-size/kastaid/getter" />
<a href="https://github.com/kastaid/getter/issues"><img alt="Issues" src="https://img.shields.io/github/issues/kastaid/getter" /></a>
<a href="https://github.com/kastaid/getter/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/kastaid/getter" /></a>
<a href="https://github.com/kastaid/getter/network/members"><img alt="Forks" src="https://img.shields.io/github/forks/kastaid/getter" /></a>
<a href="https://github.com/kastaid/getter/blob/main/LICENSE"><img alt="LICENSE" src="https://img.shields.io/github/license/kastaid/getter" /></a>
<a href="https://telegram.me/kastaid"><img alt="Telegram" src="https://img.shields.io/badge/kastaid-blue?logo=telegram" /></a>
</p>

Expand Down
8 changes: 1 addition & 7 deletions getter/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,7 @@ async def main() -> None:
do_not_remove_credit()
python_msg = f">> Python Version - {__pyversion__}"
telethon_msg = f">> Telethon Version - {__tlversion__} [Layer: {__layer__}]"
launch_msg = ">> 🚀 Getter v{} launch ({} - {}) in {} with handler [ {}ping ]".format(
__version__,
getter_app.full_name,
getter_app.uid,
getter_app.uptime,
hl,
)
launch_msg = f">> 🚀 Getter v{__version__} launch ({getter_app.full_name} - {getter_app.uid}) in {getter_app.uptime} with handler [ {hl}ping ]"
LOG.info(python_msg)
LOG.info(telethon_msg)
LOG.info(launch_msg)
Expand Down
2 changes: 1 addition & 1 deletion getter/core/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def Fetch(
statuses = statuses or {}
if not headers:
headers = {
"User-Agent": "Python/{0[0]}.{0[1]} aiohttp/{1} getter/{2}".format(
"User-Agent": "Python/{0[0]}.{0[1]} aiohttp/{1} getter/{2}".format( # noqa: UP032
sys.version_info,
aiohttp.__version__,
__version__,
Expand Down
6 changes: 1 addition & 5 deletions getter/plugins/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ async def _(kst):
text = strip_format(strip_emoji(words))
translator = Translator()
translation = await translator(text, targetlang=lang)
tr = "**Detected:** `{}`\n**Translated:** `{}`\n\n```{}```".format(
await translator.detect(translation.orig),
await translator.detect(translation.text),
translation.text,
)
tr = f"**Detected:** `{await translator.detect(translation.orig)}`\n**Translated:** `{await translator.detect(translation.text)}`\n\n```{translation.text}```"
await yy.eor(tr, parts=True)
except Exception as err:
await yy.eor(formatx_send(err), parse_mode="html")
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ruff==0.3.0
ruff==0.3.1
black==24.2.0
isort==5.13.2

0 comments on commit 0e81caa

Please sign in to comment.