Skip to content

Commit

Permalink
[melobot] Use more simple repr for bot
Browse files Browse the repository at this point in the history
  • Loading branch information
aicorein committed Oct 25, 2024
1 parent aa164e1 commit b1b80e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
__pycache__
*/__pycache__
*.bak
*.log
private
dev
*/build
Expand Down
6 changes: 1 addition & 5 deletions src/melobot/bot/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,7 @@ def __init__(
self._rip_signal = asyncio.Event()

def __repr__(self) -> str:
return (
f'Bot(name="{self.name}", '
f"plugins_num={len(self._plugins.values())}, "
f"handlers_num={sum(len(hs) for hs in self._dispatcher.handlers.values())})"
)
return f'Bot(name="{self.name}")'

@property
def loop(self) -> asyncio.AbstractEventLoop:
Expand Down

0 comments on commit b1b80e1

Please sign in to comment.