Skip to content

Commit

Permalink
[Docs] Fix docs typo
Browse files Browse the repository at this point in the history
  • Loading branch information
aicorein committed Nov 14, 2024
1 parent e1e3f5c commit 4d6b711
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/source/ob_api/v11.utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ v11 解析器
:exclude-members: __init__

.. autoclass:: melobot.protocols.onebot.v11.utils.CmdParser
:exclude-members: format

.. autoclass:: melobot.protocols.onebot.v11.utils.CmdArgFormatter

Expand Down
1 change: 1 addition & 0 deletions src/melobot/protocols/onebot/v11/utils/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ def __init__(
"""初始化一个艾特消息事件检查器
:param qid: 被艾特的 qq 号。为空则接受所有艾特消息事件;不为空则只接受指定 qid 被艾特的艾特消息事件
:param fail_cb: 检查不通过的回调
"""
super().__init__(fail_cb)
self.qid = qid
Expand Down
4 changes: 0 additions & 4 deletions src/melobot/protocols/onebot/v11/utils/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,6 @@ def __init__(
if self.ban_regex.findall(f"{''.join(cmd_start)}{''.join(cmd_sep)}"):
raise ParseError("存在命令解析器不支持的命令起始符,或命令间隔符")

self._build_parse_regex()

def _build_parse_regex(self) -> None:
"""建立用于命令解析的正则 Pattern 对象,包含命令起始符正则 pattern 和 命令间隔符正则 pattern"""
_regex = re.compile(
r"([\`\-\=\~\!\@\#\$\%\^\&\*\(\)\_\+\[\]\{\}\|\:\,\.\/\<\>\?])"
)
Expand Down

0 comments on commit 4d6b711

Please sign in to comment.