Skip to content

Feat:Support shell-like command#186

Merged
yanyongyu merged 21 commits intononebot:devfrom
AkiraXie:master
Feb 2, 2021
Merged

Feat:Support shell-like command#186
yanyongyu merged 21 commits intononebot:devfrom
AkiraXie:master

Conversation

@AkiraXie
Copy link
Copy Markdown
Member

@AkiraXie AkiraXie commented Feb 1, 2021

fix #185

@mnixry mnixry requested a review from yanyongyu February 1, 2021 14:47
@mnixry mnixry added the enhancement New feature or request label Feb 1, 2021
Comment thread nonebot/rule.py Outdated
import asyncio
from itertools import product
from typing import Any, Dict, Union, Tuple, Optional, Callable, NoReturn, Awaitable, TYPE_CHECKING
from loguru import logger
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的logger是不是应该从nonebot.log引? 而且我好像也没看到要用到logger的地方

Comment thread nonebot/rule.py Outdated
try:
args = shell_like_argsparser.parse_args(
strip_message.split())
state["args"]=dict()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有看明白为什么这里要拆成两行

state["args"] = {**args.__dict__} # 或者 args.__dict__.copy()

这样不行嘛

另外这一行是不是没格式化(

@mnixry mnixry changed the base branch from master to dev February 1, 2021 23:46
@yanyongyu yanyongyu merged commit 0d8e51f into nonebot:dev Feb 2, 2021
@mnixry mnixry added this to the 2.0.0a9 milestone Feb 7, 2021
noneflow bot pushed a commit that referenced this pull request Aug 24, 2025
noneflow bot pushed a commit that referenced this pull request Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

Feature: shell-like in nb1

9 participants