Skip to content

Commit

Permalink
pylint: auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TgCat committed Sep 19, 2024
1 parent 81d6f32 commit 9ee0ec3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
17 changes: 13 additions & 4 deletions userbot/helpers/nsfw.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,16 @@
"checker": "url",
},
"v8": {
"end": ["hboobs", "gonewild", "tentacle", "paizuri", "hthigh", "hmidriff", "pgif", "hkitsune"],
"end": [
"hboobs",
"gonewild",
"tentacle",
"paizuri",
"hthigh",
"hmidriff",
"pgif",
"hkitsune",
],
"api": "https://api.night-api.com/images/nsfw/",
"headers": {"Authorization": "s0cOd5GB0T-zqEzmtbN9E2KQdEDHizc-8wRsLtIscp"},
"checker": "url",
Expand All @@ -188,11 +197,11 @@ def nekos(endpoint=None, endpoints=endpoints):
checker = details["checker"]
result = requests.get(api + endpoint, headers=headers).json()
if checker in result:
return result[checker]
return result[checker]
elif "content" in result and "url" in result["content"]:
return result["content"]["url"]
return result["content"]["url"]
else:
raise ValueError(f"Unexpected response format: {result}")
raise ValueError(f"Unexpected response format: {result}")
return (
endpoints["v1"]["end"]
+ endpoints["v2"]["end"]
Expand Down
12 changes: 6 additions & 6 deletions userbot/plugins/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ async def search_func(event):
with open(filename, "w") as f:
f.write(text)
await catub.send_file(
event.chat_id,
filename,
caption=caption,
allow_cache=False,
reply_to=event.message.reply_to_msg_id,
)
event.chat_id,
filename,
caption=caption,
allow_cache=False,
reply_to=event.message.reply_to_msg_id,
)
os.remove(filename)
return await catevent.delete()
await catevent.edit(f"{caption} \n\n**OUTPUT:**\n`{text}`")

0 comments on commit 9ee0ec3

Please sign in to comment.