🏷️ 完善 typing 及注释

This commit is contained in:
Artin
2020-12-03 12:08:04 +08:00
parent f1a0ac099b
commit e718f25c3f
7 changed files with 58 additions and 45 deletions

View File

@ -2,6 +2,12 @@ from nonebot.exception import AdapterException
class DingAdapterException(AdapterException):
"""
:说明:
钉钉 Adapter 错误基类
"""
def __init__(self) -> None:
super.__init__("DING")
@ -11,7 +17,7 @@ class ApiError(DingAdapterException):
"""
:说明:
API 请求成功返回数据,但 API 操作失败
API 请求返回错误信息
"""
@ -24,6 +30,12 @@ class ApiError(DingAdapterException):
class SessionExpired(DingAdapterException):
"""
:说明:
发消息的 session 已经过期。
"""
def __repr__(self) -> str:
return f"<sessionWebhook is Expired>"