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 1777ef1 commit 10910fc
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions userbot/plugins/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,17 @@ async def search_func(event):
filepath = inspect.getfile(source)
caption = f"**Source:** `{filepath}`"
text = inspect.getsource(source)

await catevent.delete()
if len(text) > 4096:
with open(filename, "w") as f:
f.write(text)
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)
await edit_or_reply(event, f"{caption} \n\n**OUTPUT:**\n`{text}`")

0 comments on commit 10910fc

Please sign in to comment.