Releases: ArcletProject/Alconna
Releases · ArcletProject/Alconna
Alconna 1.7.39
What's Changed
- 🐛 fix Formatter resolve the node incorrectly
- ⬆️ Bump actions/setup-python from 4 to 5 by @dependabot in #83
Full Changelog: v1.7.38...v1.7.39
Alconna 1.7.38
Alconna 1.7.37
改进
Alconna.shortcut
可以用关键字参数传入command
与args
了- 允许提供参数来额外处理
shortcut
的正则匹配结果:from arclet.alconna import Alconna, Args eat = Alconna("what2eat", Args["time", str]) eat.shortcut( "(今天|[早中午晚][上饭餐午]|早上|夜宵|今晚)吃(?:什么|啥|点啥)(?P<help>帮助)?", arguments=["{0}", "{help}"], wrapper=lambda slot, content: "--help" if slot == "help" else content, ) print(eat.parse("晚上吃什么"))
Full Changelog: v1.7.36...v1.7.37