Percentages and ratios
还没有人认领这个 Issue。
评估
调研方向
首先,将提议的 ratio 和 percent API 与 precisedelta 的精度自定义进行比较。验证 ratio 和 percent 输入、截断、可选的小数精度以及所要求的 percent 字符串格式;完成时应包括项目现有测试中的覆盖率。
由索引模型根据 Issue 内容生成。
描述
Hello, thanks a lot for this great package !
If I'm not mistaken there is no feature yet to humanize a ratio (between 0 and 1) or a percentage (between 0-100).
It could be a great addition ! It can be just one function to handle both, with two possible inputs (ratio= or percent=). The outcome would in both cases, be a truncated percent string with optional decimal coma up to a given precision, as in 12,5%. Customization of precision with a number of decimal could be similar to precisedelta's precision customization with the units.
- 主要语言
- Python
- 星标
- 757
- 派生
- 148
- 平均合并
- 6 天 1 小时
- 30 天内合并 PR
- 12
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-humanize/humanize 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
python-humanize/humanize#379 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
python-humanize/humanize#366 ·
-
难度 3/5 1-2 天 新手友好度 52/100
python-humanize/humanize#356 · 2 条评论 ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
python-humanize/humanize#270 · 6 条评论 ·
-
help wanted
难度 4/5 3-5 天 新手友好度 35/100
python-humanize/humanize#263 · 3 个 reaction ·
查看 python-humanize/humanize 的全部 Issue
相似的 Issue
-
triage/confirmed
难度 2/5 1-3 小时 新手友好度 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
难度 1/5 1 小时以内 新手友好度 92/100
NousResearch/hermes-agent#118866 ·
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
apache/cloudstack#14222 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug
难度 2/5 1-3 小时 新手友好度 82/100