V2 Design #84
RF-Tar-Railt
started this conversation in
Ideas
Replies: 3 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
提醒我了 可以用dataclass_transform整duplication的替代品: @scope(alc)
class ResultScope:
arg1: str
arg2: int = field(default=-1, path="foo.args.bar")
@route("foo.args.baz")
def baz(self, baz: bool):
...
res: ResultScope = alc.parse(xxx, export=ResultScope)
print(res.arg2) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
部分设计可以对照 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
alconna v2需要目前以下问题:
v1下 Option 与 Subcommand比较接近;Args在某些情况下能够替代Option
构造命令时先用 Option, Subcommand导致命名空间覆盖不到
CommandMeta目前携带信息较多,考虑分出一个CommandConfig
解析系统目前无法实现流式解析,对于补全会话现有重头解析的逻辑存有性能损耗
没有调试日志
需要提供更多对外接口以进行细粒度控制(例如外接支持子命令的权限控制时)
一些历史遗留问题
Beta Was this translation helpful? Give feedback.
All reactions