ArcletProject/Alconna

0.5.5的default是换写法了吗?匹配一直是False。Python 3.10.1

tq04t46 opened this issue · 1 comments

0.5.5

test = Alconna(command='/test', main_args=Args(num=int).default(num=1))
test.analyse_message('/test 10')
matched=True head_matched=True error_data=[] _options={} _other_args={} _main_args={'num': 10}
test.analyse_message('/test')
matched=False head_matched=True error_data=[''] _options={} _other_args={} _main_args={}

0.5.3

test = Alconna(command='/test', main_args=Args(num=int).default(num=1))
test.analyse_message('/test 10')
current_index=1 is_str=True results={'main_args': {'num': 10}} raw_data={} need_main_args=True matched=True head_matched=True _options={} _args={}
test.analyse_message('/test')
current_index=1 is_str=True results={'main_args': {'num': 1}} raw_data={} need_main_args=True matched=True head_matched=True _options={} _args={}