Add "choices" parameter to argument and option as in argparse
还没有人认领这个 Issue。
评估
调研方向
Start by locating the argument and option functions and tracing how they validate values and generate --help and help output. Use the argparse choices behavior as a reference; done means accepted values are restricted to the supplied choices and those choices appear in generated help text.
由索引模型根据 Issue 内容生成。
描述
Summary
Add choices parameter to argument and option functions to accept list of allowed values for an argument or an option. Reject any values that do not match the provided list.
Enhancement's value
- This would allow developers to specify a limited set of choices and automatically validate the input against that list.
- It will be rendered in the documentation generated via
--help,helpand, thus, automatically explain to user what values are accepted for this option/argument – huge help for users.
Notes
Maybe take the same approach that works in argparse?
- 主要语言
- Python
- 星标
- 1.4k
- 派生
- 103
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-poetry/cleo 的其他 Issue
-
question
难度 5/5 一周以上 新手友好度 25/100
python-poetry/cleo#471 · 2 条评论 ·
-
feature
难度 5/5 一周以上 新手友好度 25/100
python-poetry/cleo#467 · 1 个 reaction ·
-
Poetry run doesn't work with --directory=可能已有人在做 @DSeaStar 于 61 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 45/100
python-poetry/cleo#434 · 1 条评论 ·
-
feature
难度 5/5 一周以上 新手友好度 25/100
python-poetry/cleo#433 · 4 条评论 ·
-
Formatter's `is_decorated` property is temporarily disabled during `remove_format` breaking concurrent threads可能已有人在做 @ShipItAndPray 于 171 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 40/100
python-poetry/cleo#423 · 9 条评论 ·
查看 python-poetry/cleo 的全部 Issue
相似的 Issue
-
customer-reported question
难度 2/5 1-3 小时 新手友好度 62/100
Azure/azure-sdk-for-python#49548 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
btclib-org/btclib-wallet#409 ·
维护者通常 1 天内回复
-
Phase 2 PSA Capability & Career Profile
难度 2/5 1-3 小时 新手友好度 62/100
bcgov/digital-journeys#2310 ·
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 78/100
fastmachinelearning/hls4ml#1582 ·
维护者通常 3 天内回复
-
Sort models未关闭enhancement good first issue
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复