Add type hints for type safety
还没有人认领这个 Issue。
评估
调研方向
结合 PEP 484 和 PR #785 中的简短讨论审查 Python 代码库,然后确定整个项目所需注解的范围。考虑如何应用 mypy 来检查新增的类型提示。完成的标准是代码库具有适当的类型提示,并且可以检查类型相关的错误。
由索引模型根据 Issue 内容生成。
描述
Add type hints across the codebase. They are valid syntax for Python v..3.5+, so are safe to add given we are now 3.7+.
We can then use type checking tools, such as mypy, to ensure robustness of our code and catch bugs relating to errors due to incorrect types.
See https://github.com/NCAS-CMS/cf-python/pull/785#discussion_r1638434210 for brief further discussion.
- 主要语言
- Python
- 星标
- 151
- 派生
- 23
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NCAS-CMS/cf-python 的其他 Issue
-
installation
难度 4/5 3-5 天 新手友好度 45/100
-
Attempt at unsupported conservative 3D mesh regridding可能重新可做 @sadielbartholomew 于 30 天前认领,目前没有进行中的 PR。 未关闭bug?
-
bug
难度 3/5 1-2 天 新手友好度 45/100
-
API review (4.0.0) documentation
难度 4/5 3-5 天 新手友好度 48/100
-
enhancement xarray
难度 4/5 3-5 天 新手友好度 48/100
查看 NCAS-CMS/cf-python 的全部 Issue
相似的 Issue
-
[BUG] Container scenario crashes without expected_recovery_time, kube DNS example uses retry_wait未关闭needs-triage
难度 2/5 1-3 小时 新手友好度 77/100
krkn-chaos/krkn#1627 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
NousResearch/hermes-agent#136483 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
[BUG] LazyStackedTensorDictStore zeroes the last byte of a new key set on the last element可能已有人在做 @peterdsharpe 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
pytorch/tensordict#2307 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复