🎨 fix docstring format

This commit is contained in:
yanyongyu 2021-10-02 15:07:32 +08:00
parent bac56635c0
commit 1280cf9ba3
2 changed files with 22 additions and 22 deletions

View File

@ -1044,14 +1044,14 @@ mirai-api-http 协议事件,字段与 mirai-api-http 一致。各事件字段
用户权限枚举类
>
> * `OWNER`: 群主
* `OWNER`: 群主
> * `ADMINISTRATOR`: 群管理
* `ADMINISTRATOR`: 群管理
> * `MEMBER`: 普通群成员
* `MEMBER`: 普通群成员
@ -1433,14 +1433,14 @@ Bot被邀请入群申请
用户权限枚举类
>
> * `OWNER`: 群主
* `OWNER`: 群主
> * `ADMINISTRATOR`: 群管理
* `ADMINISTRATOR`: 群管理
> * `MEMBER`: 普通群成员
* `MEMBER`: 普通群成员
@ -1453,11 +1453,11 @@ Bot被邀请入群申请
戳一戳类型枚举类
>
> * `Group`: 群
* `Group`: 群
> * `Friend`: 好友
* `Friend`: 好友

View File

@ -1,15 +1,15 @@
import json
from enum import Enum
from typing import Any, Dict, Optional, Type
from pydantic import BaseModel, Field, ValidationError
from typing_extensions import Literal
from typing import Any, Dict, Type, Optional
from pydantic import Field, BaseModel, ValidationError
from nonebot.adapters import Event as BaseEvent
from nonebot.adapters import Message as BaseMessage
from nonebot.log import logger
from nonebot.typing import overrides
from nonebot.utils import escape_tag
from nonebot.adapters import Event as BaseEvent
from nonebot.adapters import Message as BaseMessage
class UserPermission(str, Enum):
@ -18,9 +18,9 @@ class UserPermission(str, Enum):
用户权限枚举类
* ``OWNER``: 群主
* ``ADMINISTRATOR``: 群管理
* ``MEMBER``: 普通群成员
* ``OWNER``: 群主
* ``ADMINISTRATOR``: 群管理
* ``MEMBER``: 普通群成员
"""
OWNER = 'OWNER'
ADMINISTRATOR = 'ADMINISTRATOR'
@ -33,8 +33,8 @@ class NudgeSubjectKind(str, Enum):
戳一戳类型枚举类
* ``Group``:
* ``Friend``: 好友
* ``Group``:
* ``Friend``: 好友
"""
Group = 'Group'
Friend = 'Friend'
@ -107,7 +107,7 @@ class Event(BaseEvent):
@overrides(BaseEvent)
def get_type(self) -> Literal["message", "notice", "request", "meta_event"]:
from . import message, meta, notice, request
from . import meta, notice, message, request
if isinstance(self, message.MessageEvent):
return 'message'
elif isinstance(self, notice.NoticeEvent):