Improve __repr__ for Webhook and SyncWebhook

This commit is contained in:
owocado 2024-03-22 19:32:45 +05:30 committed by GitHub
parent 2f71506169
commit 425edd2e10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -1155,7 +1155,7 @@ class Webhook(BaseWebhook):
self.proxy_auth: Optional[aiohttp.BasicAuth] = proxy_auth
def __repr__(self) -> str:
return f'<Webhook id={self.id!r}>'
return f'<Webhook id={self.id!r} type={self.type!r} name={self.name!r}>'
@property
def url(self) -> str:

View File

@ -608,7 +608,7 @@ class SyncWebhook(BaseWebhook):
self.session: Session = session
def __repr__(self) -> str:
return f'<Webhook id={self.id!r}>'
return f'<Webhook id={self.id!r} type={self.type!r} name={self.name!r}>'
@property
def url(self) -> str: