Skip to content
This repository was archived by the owner on Aug 28, 2019. It is now read-only.

Commit c9cdb47

Browse files
committed
Add __repr__ for View
1 parent db58e62 commit c9cdb47

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

discord/ui/view.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ def __init__(self, timeout: Optional[float] = 180.0):
160160
self._timeout_handler: Optional[asyncio.TimerHandle] = None
161161
self._stopped = loop.create_future()
162162

163+
def __repr__(self) -> str:
164+
return f'<{self.__class__.__name__} timeout={self.timeout} children={len(self.children)}>'
165+
163166
def to_components(self) -> List[Dict[str, Any]]:
164167
def key(item: Item) -> int:
165168
return item._rendered_row or 0

0 commit comments

Comments
 (0)